8152023: MethodHandleAccessProvider.resolveLinkToTarget throws NPE/IAE on null/wrong argument
authordnsimon
Thu, 31 Mar 2016 09:16:49 -0700
changeset 37279 952a86479a74
parent 37278 11de0a6c0877
child 37280 bf5d76dcf685
8152023: MethodHandleAccessProvider.resolveLinkToTarget throws NPE/IAE on null/wrong argument Reviewed-by: kvn, twisti
hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MethodHandleAccessProvider.java
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MethodHandleAccessProvider.java	Thu Mar 31 09:16:49 2016 -0700
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MethodHandleAccessProvider.java	Thu Mar 31 09:16:49 2016 -0700
@@ -75,8 +75,12 @@
     /**
      * Resolves the invocation target for an invocation of a {@code MethodHandle.linkTo*} method
      * with the given constant member name. The member name is the last parameter of the
-     * {@code linkTo*} method. Returns {@code null} if the invocation target is not available at
-     * this time.
+     * {@code linkTo*} method.
+     *
+     * @returns {@code null} if the invocation target is not available at this time
+     * @throws NullPointerException if {@code memberName} is null
+     * @throws IllegalArgumentException if {@code memberName} is not a
+     *             {@code java.lang.invoke.MemberName}
      */
     ResolvedJavaMethod resolveLinkToTarget(JavaConstant memberName);
 }