Revert accidental deletion of cast needed for Java 9

This commit is contained in:
Christoph Büscher 2017-08-31 16:13:12 +02:00
parent 697bc266ce
commit 294d167973
1 changed files with 1 additions and 1 deletions

View File

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