-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
7
-
generic
-
generic
Please see the minimized test below to reproduce the issue.
Minimized test:
===============
$ cat Test.java
import java.lang.invoke.*;
public class Test {
public static void main(String[] args) throws Exception {
MethodType.fromMethodDescriptorString(
(String) null, ClassLoader.getSystemClassLoader());
}
}
Minimized test output:
========================
$ javac Test.java
$java -showversion -verify Test
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b138)
Java HotSpot(TM) Server VM (build 21.0-b08, mixed mode)
Exception in thread "main" java.lang.NullPointerException
at sun.invoke.util.BytecodeDescriptor.parseMethod(BytecodeDescriptor.java:41)
at java.lang.invoke.MethodType.fromMethodDescriptorString(MethodType.java:717)
at Test.main(Test.java:5)
NPE is also thrown for descriptor "(.)"
Minimized test:
===============
$ cat Test.java
import java.lang.invoke.*;
public class Test {
public static void main(String[] args) throws Exception {
MethodType.fromMethodDescriptorString(
(String) null, ClassLoader.getSystemClassLoader());
}
}
Minimized test output:
========================
$ javac Test.java
$java -showversion -verify Test
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b138)
Java HotSpot(TM) Server VM (build 21.0-b08, mixed mode)
Exception in thread "main" java.lang.NullPointerException
at sun.invoke.util.BytecodeDescriptor.parseMethod(BytecodeDescriptor.java:41)
at java.lang.invoke.MethodType.fromMethodDescriptorString(MethodType.java:717)
at Test.main(Test.java:5)
NPE is also thrown for descriptor "(.)"
- duplicates
-
JDK-7032323 code changes for JSR 292 EG adjustments to API, through Public Review
-
- Closed
-
- relates to
-
JDK-7038847 MethodType.fromMethodDescriptorString accepts both "binary names"/"internal form of binary names"
-
- Closed
-