I didn't see an answer to this question:

On 30.04.2017 23:45, Stephan Herrmann wrote:
On 30.04.2017 17:47, Alan Bateman wrote:
On 30/04/2017 12:10, Stephan Herrmann wrote:

:

Java 9 could make "API leaks" either illegal or ineffective and thus rule out
an entire category of ill-formed programs, which to-date must unfortunately
be accepted by module-unaware compilers:

  (A) Java 9 has the opportunity to say that the declaration of m1 is illegal,
  because it publicly exposes a non-accessible type, which is broken in
  every regard.
FWIW, this is -Xlint:exports when using javac, e.g: public class in a 
non-exported package:

src/m/p/C1.java:4: warning: [exports] class C2 in module m is not exported
    public q.C2 hello() { return null; }
            ^
1 warning

or a non-public class in an exported package:

src/m/p/C1.java:4: warning: [exports] class C2 in module m is not accessible to 
clients that require this module
    public C2 hello() { return null; }
           ^
1 warning

-Alan

Thanks for the hint.

My obvious question: Is this specified (where?), or javac's own deliberation?
Even if the latter, it would be great to see a list of jigsaw related lints.

I see several additions to Xlint in 
https://docs.oracle.com/javase/9/tools/javac.htm

Are these Xlint tokens also supported as @SuppressWarnings tokens? If so, we 
should
definitely coordinate between compilers, which requires more specific 
descriptions
of the warnings in each of those categories. "Issues regarding ..." is not very
specific :)

Stephan

Reply via email to