Integrated: 8357862: Java argument file is parsed unexpectedly with trailing comment

Christian Stein cstein at openjdk.org
Tue Jun 17 14:03:38 UTC 2025


On Mon, 2 Jun 2025 13:46:23 GMT, Christian Stein <cstein at openjdk.org> wrote:

> Please review this fix to correctly parse tokens in an argument file that contains trailing comments without preceding whitespace characters before the '#' comment marker, the number sign.
> 
> The specifaction of the `java` Command has in section [java Command-Line Argument Files](https://docs.oracle.com/en/java/javase/12/docs/specs/man/java.html#java-command-line-argument-files):
> 
> Use the number sign `#` in the argument file to identify comments.
> All characters following the `#` are ignored until the end of line.
> 
> There is not requirement specified to prepend a comment in a line with at least one argument with one or more preceding whitespace characters.

This pull request has now been integrated.

Changeset: 21b72dea
Author:    Christian Stein <cstein at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/21b72dea7805357b3644161d1a158c52f49d0e6e
Stats:     40 lines in 2 files changed: 29 ins; 7 del; 4 mod

8357862: Java argument file is parsed unexpectedly with trailing comment

Co-authored-by: Stuart Marks <smarks at openjdk.org>
Reviewed-by: vromero

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

PR: https://git.openjdk.org/jdk/pull/25589


More information about the core-libs-dev mailing list