changeset 13678:60f2a0ea5fa6

8138578: MethodHandles.Lookup.findSpecial() Javadoc fails to consider static methods Reviewed-by: psandoz, vlivanov, mhaupt Contributed-by: Shilpi Rastogi <shilpi.rastogi@oracle.com>
author mhaupt
date Mon, 08 Feb 2016 17:37:46 +0100
parents 3e5970acb0a7
children 5e24a8cdbcd7 73de275f4541
files src/java.base/share/classes/java/lang/invoke/MethodHandles.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Mon Feb 08 09:56:26 2016 -0500
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Mon Feb 08 17:37:46 2016 +0100
@@ -1043,7 +1043,8 @@
          * @param specialCaller the proposed calling class to perform the {@code invokespecial}
          * @return the desired method handle
          * @throws NoSuchMethodException if the method does not exist
-         * @throws IllegalAccessException if access checking fails
+         * @throws IllegalAccessException if access checking fails,
+         *                                or if the method is {@code static},
          *                                or if the method's variable arity modifier bit
          *                                is set and {@code asVarargsCollector} fails
          * @exception SecurityException if a security manager is present and it
@@ -1275,7 +1276,8 @@
          * @param m the reflected method
          * @param specialCaller the class nominally calling the method
          * @return a method handle which can invoke the reflected method
-         * @throws IllegalAccessException if access checking fails
+         * @throws IllegalAccessException if access checking fails,
+         *                                or if the method is {@code static},
          *                                or if the method's variable arity modifier bit
          *                                is set and {@code asVarargsCollector} fails
          * @throws NullPointerException if any argument is null