Skip to content

Commit ed44b1b

Browse files
author
Christoph Büscher
committed
Rank-Eval: Reduce scope of an unchecked supression
We should only supress the unchecked warnings on ConstructingObjectParser.
1 parent b8f5abb commit ed44b1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/rank-eval/src/main/java/org/elasticsearch/index/rankeval/RatedRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
* }
7171
* </pre>
7272
*/
73-
@SuppressWarnings("unchecked")
7473
public class RatedRequest implements Writeable, ToXContentObject {
7574
private final String id;
7675
private final List<String> summaryFields;
@@ -250,6 +249,7 @@ public void addSummaryFields(List<String> summaryFields) {
250249
private static final ParseField FIELDS_FIELD = new ParseField("summary_fields");
251250
private static final ParseField TEMPLATE_ID_FIELD = new ParseField("template_id");
252251

252+
@SuppressWarnings("unchecked")
253253
private static final ConstructingObjectParser<RatedRequest, Void> PARSER = new ConstructingObjectParser<>("request",
254254
a -> new RatedRequest((String) a[0], (List<RatedDocument>) a[1], (SearchSourceBuilder) a[2], (Map<String, Object>) a[3],
255255
(String) a[4]));

0 commit comments

Comments
 (0)