dweiss commented on code in PR #14533: URL: https://github.com/apache/lucene/pull/14533#discussion_r2066149285
########## lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java: ########## @@ -365,7 +365,9 @@ private static <A> MMapIndexInputProvider<A> lookupProvider() { // access through the lookup: final var constr = lookup.findConstructor(cls, MethodType.methodType(void.class, int.class)); try { - return (MMapIndexInputProvider<A>) constr.invoke(maxPermits); + @SuppressWarnings("unchecked") Review Comment: It does look odd, I agree. ``` Execution failed for task ':lucene:core:compileJava'. > Compilation failed; see the compiler output below. Note: Recompile with -Xlint:deprecation for details. error: warnings found and -Werror specified /home/.../lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java:368: warning: [unchecked] unchecked cast return (MMapIndexInputProvider<A>) constr.invoke(maxPermits); ^ required: MMapIndexInputProvider<A> found: MMapIndexInputProvider where A is a type-variable: A extends Object declared in method <A>lookupProvider() Note: Some input files use or override a deprecated API. 1 error 1 warning ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org