Integrated: 8248843: java in source-file mode suggests javac-only options

Adam Sotona asotona at openjdk.java.net
Tue May 25 04:56:11 UTC 2021


On Tue, 18 May 2021 14:09:07 GMT, Adam Sotona <asotona at openjdk.org> wrote:

> `java` in source-file mode (see JEP 330) displays compiler notes suggesting `recompile with -Xdiags:verbose to get full output`. According JEP 330 these advanced `javac` optionns are not allowed. The goal with JEP 330 was to support developers that are at the early stages of learning Java, so options such as `-Xdiags:verbose` are out of their scope.
> 
> This patch prevents displaying `Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output` suggestion in `java` source-file mode by implicitly enabling `-Xdiags:verbose` in com.sun.tool.javac.launcher.Main for all invocations.
> 
> Beside avoiding prohibited `javac` option suggestion notes this patch has positive effect of more verbose compilation diagnostic. Higher diagnostic verbosity is appreciated by users learning Java on single-source programs in `java` source-file mode.

This pull request has now been integrated.

Changeset: 31d0f0d8
Author:    Adam Sotona <asotona at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/31d0f0d895ef4039d2e96a8fb6e990e93eed4d41
Stats:     1 line in 1 file changed: 1 ins; 0 del; 0 mod

8248843: java in source-file mode suggests javac-only options

Reviewed-by: vromero

-------------

PR: https://git.openjdk.java.net/jdk/pull/4094


More information about the compiler-dev mailing list