-
Bug
-
Resolution: Fixed
-
P2
-
9
-
b156
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8174526 | 10 | Jonathan Gibbons | P2 | Resolved | Fixed | b01 |
Currently spec specifies:
It is permitted for opens to specify a package which is not observable in the current module.
However javac from JDK9 b152 currently produce compiler error in this case. For instance following module declaration fails to be compiled, provided there are no package 'pack' in module A:
module A {
opens pack;
}
The minimized test case is attached. In order to reproduce, please:
1. Unzip attached archive to some directory on Unix/Linux machine, say A;
2. Modify A/Test59/test.sh by setting JDK_HOME to your JDK root dir;
3. Run A/Test59/test.sh;
This results in following output:
./A/module-info.java:2: error: package is empty or does not exist: pack
opens pack;
^
1 error
It is permitted for opens to specify a package which is not observable in the current module.
However javac from JDK9 b152 currently produce compiler error in this case. For instance following module declaration fails to be compiled, provided there are no package 'pack' in module A:
module A {
opens pack;
}
The minimized test case is attached. In order to reproduce, please:
1. Unzip attached archive to some directory on Unix/Linux machine, say A;
2. Modify A/Test59/test.sh by setting JDK_HOME to your JDK root dir;
3. Run A/Test59/test.sh;
This results in following output:
./A/module-info.java:2: error: package is empty or does not exist: pack
opens pack;
^
1 error
- backported by
-
JDK-8174526 javac: 'opens' statement cannot specify non observable package
-
- Resolved
-
- duplicates
-
JDK-8170650 javac should emit a warning (not an error) when `opens` references a package that does not exist
-
- Closed
-
- relates to
-
JDK-8170650 javac should emit a warning (not an error) when `opens` references a package that does not exist
-
- Closed
-
-
JDK-8172902 VM: 'opens' statement cannot specify non observable package
-
- Closed
-