Fix Java 9 compilation issue
My IDE ate a cast that seems required to make Java 9 happy.
This commit is contained in:
parent
6f131a63d3
commit
99aa04b79c
|
@ -237,7 +237,7 @@ public abstract class AbstractSortTestCase<T extends SortBuilder<T>> extends EST
|
|||
private T copy(T original) throws IOException {
|
||||
/* 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 copyWriteable(original, namedWriteableRegistry,
|
||||
return (T) copyWriteable(original, namedWriteableRegistry,
|
||||
namedWriteableRegistry.getReader(SortBuilder.class, original.getWriteableName()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue