-
Bug
-
Resolution: Fixed
-
P3
-
13, 15, 16, 17
-
b13
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8274904 | 17.0.2 | Ekaterina Vergizova | P3 | Resolved | Fixed | b03 |
```
import static java.util.Map.Entry.comparingByKey;
import java.util.List;
import java.util.Map;
import java.util.stream.Stream;
public class T {
void f(Stream<Map.Entry<Long, List<String>>> stream) {
stream
.sorted(
comparingByKey()
.thenComparing((Map.Entry<Long, List<String>> e) -> e.getValue().hashCode()))
.count();
}
}
```
```
javac -fullversion T.java
javac full version "16-ea+34-2216"
An exception has occurred in the compiler (16-ea). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you.
java.lang.NullPointerException: Cannot invoke "com.sun.tools.javac.code.Type.getThrownTypes()" because "tree.meth.type" is null
at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitApply(Flow.java:1383)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1745)
at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:440)
at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.visitSelect(TreeScanner.java:316)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:2273)
at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:440)
at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitApply(Flow.java:1381)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1745)
at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:440)
at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.visitExec(TreeScanner.java:219)
```
- backported by
-
JDK-8274904 NPE in Flow$FlowAnalyzer.visitApply: Cannot invoke getThrownTypes because tree.meth.type is null
-
- Resolved
-
- duplicates
-
JDK-8273863 NPE: Cannot invoke "com.sun.tools.javac.code.Type.getThrownTypes()" because "tree.meth.type" is null
-
- Closed
-
-
JDK-8274626 NPE: Cannot invoke "com.sun.tools.javac.code.Type.getThrownTypes()" because "tree.meth.type" is null
-
- Closed
-
-
JDK-8278038 Generic types can cause NullPointerException in Java
-
- Closed
-
-
JDK-8267439 "tree.meth.type is null" error with generic anonymous class type inference.
-
- Closed
-
- relates to
-
JDK-8205418 Assorted improvements to source code model
-
- Resolved
-
-
JDK-8282161 java.lang.NullPointerException at jdk.compiler/com.sun.tools.javac.comp.Flow
-
- Resolved
-
- links to
-
Commit openjdk/jdk17u/ccb20347
-
Commit openjdk/jdk/75d987a0
-
Review openjdk/jdk17u/152
-
Review openjdk/jdk/5307