RFR: 8272728: javac ignores any -J option in @argfiles silently
Christian Stein
cstein at openjdk.java.net
Mon Oct 25 09:05:11 UTC 2021
On Mon, 25 Oct 2021 08:50:03 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:
>> Make javac error on `-J` being present in `@argfiles` or other locations, where the launcher didn't process and remove them.
>
> test/langtools/tools/javac/options/modes/AtFilesTest.java line 75:
>
>> 73: .checkResult(Main.Result.CMDERR.exitCode)
>> 74: .checkLog(Log.DIRECT, "-J-verbose");
>> 75: }
>
> Should we add a test that for invalid option as well? -J-non_existent_option ?
In order to ensure that valid and invalid values passed to `-J` are detected?
If yes, then it does not add much to the already tested behaviour: all occurances of `-J` (with valid and invalid values) within an AtFile are now reported as an error. The tests for valid values are performed at launcher-level (I hope).
-------------
PR: https://git.openjdk.java.net/jdk/pull/5891
More information about the compiler-dev
mailing list