Skip to content

Commit 99aa04b

Browse files
committed
Fix Java 9 compilation issue
My IDE ate a cast that seems required to make Java 9 happy.
1 parent 6f131a6 commit 99aa04b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/test/java/org/elasticsearch/search/sort/AbstractSortTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ protected static QueryBuilder randomNestedFilter() {
237237
private T copy(T original) throws IOException {
238238
/* The cast below is required to make Java 9 happy. Java 8 infers the T in copyWriterable to be the same as AbstractSortTestCase's
239239
* T but Java 9 infers it to be SortBuilder. */
240-
return copyWriteable(original, namedWriteableRegistry,
240+
return (T) copyWriteable(original, namedWriteableRegistry,
241241
namedWriteableRegistry.getReader(SortBuilder.class, original.getWriteableName()));
242242
}
243243
}

0 commit comments

Comments
 (0)