JDK 9 RFR to remove a raw lint warning from java/lang/invoke/MethodHandleImpl.java

Joe Darcy joe.darcy at oracle.com
Tue Mar 4 02:03:55 UTC 2014


Hello,

The recent changeset for

     8027827: Improve performance of catchException combinator
     8034120: MethodHandles.catchException doesn't handle 
VarargsCollector right

introduced a raw lint warning to the core libraries. Please review the 
patch below which removes the warning by adding "<? extends Throwable>" 
to the type the exType parameter of the method. A JDK build succeeds 
with the new signature in place.

Thanks,

-Joe

diff -r 6cfedc362f48 
src/share/classes/java/lang/invoke/MethodHandleImpl.java
--- a/src/share/classes/java/lang/invoke/MethodHandleImpl.java Mon Mar 
03 18:17:00 2014 +0400
+++ b/src/share/classes/java/lang/invoke/MethodHandleImpl.java Mon Mar 
03 17:49:52 2014 -0800
@@ -734,7 +734,7 @@
       * (see {@link InvokerBytecodeGenerator#emitGuardWithCatch 
emitGuardWithCatch}).
       */
      @LambdaForm.Hidden
-    static Object guardWithCatch(MethodHandle target, Class exType, 
MethodHandle catcher,
+    static Object guardWithCatch(MethodHandle target, Class<? extends 
Throwable> exType, MethodHandle catcher,
                                   Object... av) throws Throwable {
          try {
              return target.invokeWithArguments(av);




More information about the core-libs-dev mailing list