Skip to content

Commit 282a7a5

Browse files
committed
Add non inspection checks
1 parent dfe011c commit 282a7a5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

modules/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/XContentBuilder.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ public XContentBuilder field(XContentBuilderString name, Map<String, Object> val
364364
return this;
365365
}
366366

367-
public XContentBuilder field(String name, List<Object> value) throws IOException {
367+
public XContentBuilder field(String name, List value) throws IOException {
368368
startArray(name);
369369
for (Object o : value) {
370370
value(o);
@@ -373,7 +373,7 @@ public XContentBuilder field(String name, List<Object> value) throws IOException
373373
return this;
374374
}
375375

376-
public XContentBuilder field(XContentBuilderString name, List<Object> value) throws IOException {
376+
public XContentBuilder field(XContentBuilderString name, List value) throws IOException {
377377
startArray(name);
378378
for (Object o : value) {
379379
value(o);
@@ -515,6 +515,7 @@ public XContentBuilder field(String name, Object value) throws IOException {
515515
} else if (value instanceof ReadableInstant) {
516516
field(name, (ReadableInstant) value);
517517
} else if (value instanceof Map) {
518+
//noinspection unchecked
518519
field(name, (Map<String, Object>) value);
519520
} else if (value instanceof List) {
520521
field(name, (List) value);
@@ -559,6 +560,7 @@ public XContentBuilder field(XContentBuilderString name, Object value) throws IO
559560
} else if (value instanceof ReadableInstant) {
560561
field(name, (ReadableInstant) value);
561562
} else if (value instanceof Map) {
563+
//noinspection unchecked
562564
field(name, (Map<String, Object>) value);
563565
} else if (value instanceof List) {
564566
field(name, (List) value);
@@ -602,6 +604,7 @@ public XContentBuilder value(Object value) throws IOException {
602604
} else if (value instanceof ReadableInstant) {
603605
value((ReadableInstant) value);
604606
} else if (value instanceof Map) {
607+
//noinspection unchecked
605608
value((Map<String, Object>) value);
606609
} else {
607610
throw new IOException("Type not allowed [" + type + "]");

0 commit comments

Comments
 (0)