-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P2
-
Affects Version/s: 17
-
Component/s: core-libs
-
b28
-
Verified
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
|---|---|---|---|---|---|---|
| JDK-8269192 | 18 | Vicente Arturo Romero Zaldivar | P2 | Resolved | Fixed | b03 |
| JDK-8270613 | 17.0.1 | Vicente Arturo Romero Zaldivar | P2 | Resolved | Fixed | b03 |
Specification j.l.constant.DirectMethodHandleDesc.Kind.valueOf(int)
( https://download.java.net/java/early_access/jdk17/docs/api/java.base/java/lang/constant/DirectMethodHandleDesc.Kind.html#valueOf(int) )
says:
> Returns the enumeration member with the given refKind field. Behaves as if valueOf(refKind, false). As a special case, if refKind is REF_invokeInterface (9) then the isInterface field will be true.
However if we call
Kind.valueOf(MethodHandleInfo.REF_invokeInterface);
then IAE is thrown
java.lang.IllegalArgumentException: refKind=9
at java.base/java.lang.constant.DirectMethodHandleDesc$Kind.valueOf(DirectMethodHandleDesc.java:149)
at java.base/java.lang.constant.DirectMethodHandleDesc$Kind.valueOf(DirectMethodHandleDesc.java:111)
As if we call
Kind.valueOf(MethodHandleInfo.REF_invokeInterface, false)
and not as if the last arg is 'true'.
( https://download.java.net/java/early_access/jdk17/docs/api/java.base/java/lang/constant/DirectMethodHandleDesc.Kind.html#valueOf(int) )
says:
> Returns the enumeration member with the given refKind field. Behaves as if valueOf(refKind, false). As a special case, if refKind is REF_invokeInterface (9) then the isInterface field will be true.
However if we call
Kind.valueOf(MethodHandleInfo.REF_invokeInterface);
then IAE is thrown
java.lang.IllegalArgumentException: refKind=9
at java.base/java.lang.constant.DirectMethodHandleDesc$Kind.valueOf(DirectMethodHandleDesc.java:149)
at java.base/java.lang.constant.DirectMethodHandleDesc$Kind.valueOf(DirectMethodHandleDesc.java:111)
As if we call
Kind.valueOf(MethodHandleInfo.REF_invokeInterface, false)
and not as if the last arg is 'true'.
- backported by
-
JDK-8269192 j.l.constant.DirectMethodHandleDesc.Kind.valueOf(int) implementation doesn't conform to the spec regarding REF_invokeInterface handling
-
- Resolved
-
-
JDK-8270613 j.l.constant.DirectMethodHandleDesc.Kind.valueOf(int) implementation doesn't conform to the spec regarding REF_invokeInterface handling
-
- Resolved
-