-
Bug
-
Resolution: Fixed
-
P2
-
9
-
b164
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8178222 | 10 | Jan Lahoda | P2 | Resolved | Fixed | b04 |
See the attached example - unpack, fill "TEST_JAVA_HOME" into "run.sh" and execute "run.exe". Will produce:
---
src/p/Test.java:1: error: Second.test() in package p2 is not accessible
package p; public class Test { { p1.First.get().test(); } }
^
(package p2 is declared in module , which does not export it)
1 error
---
That is wrong, the compilation should succeed. Add:
---
import p2.*;
---
to src/p/Test.java allows the compilation to succeed.
Reported here:
http://mail.openjdk.java.net/pipermail/jdk9-dev/2017-March/005672.html
http://mail.openjdk.java.net/pipermail/jigsaw-dev/2017-March/011755.html
---
src/p/Test.java:1: error: Second.test() in package p2 is not accessible
package p; public class Test { { p1.First.get().test(); } }
^
(package p2 is declared in module , which does not export it)
1 error
---
That is wrong, the compilation should succeed. Add:
---
import p2.*;
---
to src/p/Test.java allows the compilation to succeed.
Reported here:
http://mail.openjdk.java.net/pipermail/jdk9-dev/2017-March/005672.html
http://mail.openjdk.java.net/pipermail/jigsaw-dev/2017-March/011755.html
- backported by
-
JDK-8178222 Denied access when named module accesses unreferences package from the unnamed module
-
- Resolved
-