RFR: JDK-8193302: Javac AssertionError: typeSig ERROR on usage of @Generated

Jan Lahoda jan.lahoda at oracle.com
Thu Jun 7 13:41:09 UTC 2018


Hi,

When seeing an import-on-demand importing from a package, javac may 
currently accept an import from a package that is not visible to the 
current module, but whose name is a prefix of a name of a package that 
is visible. For example:
import java.*;

This contradicts JLS 7.5.2. (Type-Import-on-Demand Declarations), which 
requires that the package named in the import is uniquely visible.

The proposal here is to produce errors for such not-visible packages in 
imports.

Bug: https://bugs.openjdk.java.net/browse/JDK-8193302
CSR: https://bugs.openjdk.java.net/browse/JDK-8204534
Release note: https://bugs.openjdk.java.net/browse/JDK-8204542
Webrev: http://cr.openjdk.java.net/~jlahoda/8193302/webrev.00/

Any feedback and/or comments?

Thanks,
     Jan


More information about the compiler-dev mailing list