Rank-Eval: Reduce scope of an unchecked supression
We should only supress the unchecked warnings on ConstructingObjectParser.
This commit is contained in:
parent
f7ba14d5f4
commit
bec888fa78
|
@ -70,7 +70,6 @@ import java.util.Set;
|
||||||
* }
|
* }
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public class RatedRequest implements Writeable, ToXContentObject {
|
public class RatedRequest implements Writeable, ToXContentObject {
|
||||||
private final String id;
|
private final String id;
|
||||||
private final List<String> summaryFields;
|
private final List<String> summaryFields;
|
||||||
|
@ -250,6 +249,7 @@ public class RatedRequest implements Writeable, ToXContentObject {
|
||||||
private static final ParseField FIELDS_FIELD = new ParseField("summary_fields");
|
private static final ParseField FIELDS_FIELD = new ParseField("summary_fields");
|
||||||
private static final ParseField TEMPLATE_ID_FIELD = new ParseField("template_id");
|
private static final ParseField TEMPLATE_ID_FIELD = new ParseField("template_id");
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
private static final ConstructingObjectParser<RatedRequest, Void> PARSER = new ConstructingObjectParser<>("request",
|
private static final ConstructingObjectParser<RatedRequest, Void> PARSER = new ConstructingObjectParser<>("request",
|
||||||
a -> new RatedRequest((String) a[0], (List<RatedDocument>) a[1], (SearchSourceBuilder) a[2], (Map<String, Object>) a[3],
|
a -> new RatedRequest((String) a[0], (List<RatedDocument>) a[1], (SearchSourceBuilder) a[2], (Map<String, Object>) a[3],
|
||||||
(String) a[4]));
|
(String) a[4]));
|
||||||
|
|
Loading…
Reference in New Issue