-
Bug
-
Resolution: Fixed
-
P4
-
9
-
b40
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085463 | emb-9 | Jan Lahoda | P4 | Resolved | Fixed | team |
When a ScopeImpl that is already shared is dupUnshared, the result is a ScopeImpl that partly contains and partly does not contain any Symbols added in the child Scopes. Moreover "remove" crashes with a NPE:
java.lang.NullPointerException
at com.sun.tools.javac.code.Scope$ScopeImpl.remove(Scope.java:406)
at DupUnsharedTest.run(DupUnsharedTest.java:72)
at DupUnsharedTest.main(DupUnsharedTest.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
at java.lang.Thread.run(Thread.java:745)
Test case is attached.
java.lang.NullPointerException
at com.sun.tools.javac.code.Scope$ScopeImpl.remove(Scope.java:406)
at DupUnsharedTest.run(DupUnsharedTest.java:72)
at DupUnsharedTest.main(DupUnsharedTest.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
at java.lang.Thread.run(Thread.java:745)
Test case is attached.
- backported by
-
JDK-8085463 WriteableScope.dupUnshared misbehaves on shared Scopes
-
- Resolved
-
- duplicates
-
JDK-8186808 Anonymous Classes in Case Statement
-
- Closed
-
- relates to
-
JDK-8064931 tools/javac/scope/DupUnsharedTest.java needs to be updated to add the bug id
-
- Resolved
-