Fix java 9 build
We removed a cast we needed to appease Java 9. I've recreated it in simpler form and left a comment about why we need it.
This commit is contained in:
parent
8de4be9e4d
commit
e508f2ef6a
|
@ -249,7 +249,9 @@ public abstract class AbstractSortTestCase<T extends SortBuilder<T>> extends EST
|
|||
|
||||
@SuppressWarnings("unchecked")
|
||||
private T copy(T original) throws IOException {
|
||||
return copyWriteable(original, namedWriteableRegistry,
|
||||
/* The cast below is required to make Java 9 happy. Java 8 infers the T in copyWriterable to be the same as AbstractSortTestCase's
|
||||
* T but Java 9 infers it to be SortBuilder. */
|
||||
return (T) copyWriteable(original, namedWriteableRegistry,
|
||||
namedWriteableRegistry.getReader(SortBuilder.class, original.getWriteableName()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue