-
CSR
-
Resolution: Approved
-
P3
-
None
-
behavioral
-
minimal
-
Document existing behavior.
-
Java API
-
SE
Summary
Method j.l.c.MethodHandleDesc::of throws an exception in a case not documented by its specification.
Problem
Method java.lang.constant.MethodHandleDesc::of throws an undocumented exception, IllegalArgumentException.
Solution
Add the missing exception to the specification.
Specification
diff -r 657f6e484bc6 -r f849dfd818a1 src/java.base/share/classes/java/lang/constant/MethodHandleDesc.java
--- a/src/java.base/share/classes/java/lang/constant/MethodHandleDesc.java Fri May 17 13:16:07 2019 -0400
+++ b/src/java.base/share/classes/java/lang/constant/MethodHandleDesc.java Fri May 17 15:51:20 2019 -0400
@@ -70,6 +70,8 @@
* for a field or constructor
* @return the {@linkplain MethodHandleDesc}
* @throws NullPointerException if any of the non-ignored arguments are null
+ * @throws IllegalArgumentException if the descriptor string is not a valid
+ * method or field descriptor
* @jvms 4.4.8 The CONSTANT_MethodHandle_info Structure
* @jvms 4.2.2 Unqualified Names
* @jvms 4.3.2 Field Descriptors
- csr of
-
JDK-8223725 j.l.c.MethodHandleDesc::of throws undocumented exception IllegalArgumentException
-
- Resolved
-