Fix Java 9 compilation issue

My IDE ate a cast that seems required to make Java 9 happy.
This commit is contained in:
Christoph Büscher 2017-06-29 20:55:48 +02:00
parent 6f131a63d3
commit 99aa04b79c
1 changed files with 1 additions and 1 deletions

View File

@ -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()));
}
}