When I launch a single-file source-code program that uses incubator modules, I get duplicate warnings:
$ echo 'public class Foo { public static void main(String ... args) { } }' >Foo.java
$ java --add-modules jdk.incubator.vector Foo.java
WARNING: Using incubator modules: jdk.incubator.vector
warning: using incubating module(s): jdk.incubator.vector
1 warning
$
We should omit the second warning, which is issued by the compiler. This could be done in the compiler via a special -XD option, or by checking which file manager is in use since the source launcher has a custom file manager.
$ echo 'public class Foo { public static void main(String ... args) { } }' >Foo.java
$ java --add-modules jdk.incubator.vector Foo.java
WARNING: Using incubator modules: jdk.incubator.vector
warning: using incubating module(s): jdk.incubator.vector
1 warning
$
We should omit the second warning, which is issued by the compiler. This could be done in the compiler via a special -XD option, or by checking which file manager is in use since the source launcher has a custom file manager.
- relates to
-
JDK-8290563 Fix incorrect and inconsistent incubator-module warnings
-
- Open
-