JDK-8204542 : Release Note: Packages Not Visible in Imports Are Rejected
  • Type: Sub-task
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 11
  • Priority: P3
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2018-06-07
  • Updated: 2019-04-09
  • Resolved: 2018-06-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
11Resolved
Description
`javac` used to accept imports from packages that were not visible in the current module but whose names were prefixes of names of visible packages. These are now rejected when compiling with -source >= 9.

Comments
The description is arguably too restrictive. It talks about "-source >= 9". It doesn't take into account other ways to set the source version, such as "no option" (default) or the --release option. It would be better to use an abstract (but official) term for the source level being compiled. Looking to javac --help for inspiration: Specify where to place generated source files -source <release> Provide source compatibility with specified release. Supported releases: 7, 8, 9, 10, 11, 12 --release <release> Compile for a specific release. Supported releases: 7, 8, 9, 10, 12 So, possible suggestions for the Description are These are now rejected when compiling for source version 9 or later. These are now rejected when compiling for release 9 or later.
13-09-2018