Re: RFR: 8357862: Java argument file is parsed unexpectedly with trailing comment [v2]

2025-06-11 Thread Vicente Romero
On Wed, 11 Jun 2025 08:30:18 GMT, Christian Stein 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` Co

Re: RFR: 8357862: Java argument file is parsed unexpectedly with trailing comment [v2]

2025-06-11 Thread Christian Stein
On Wed, 11 Jun 2025 11:41:41 GMT, David Beaumont wrote: >> Christian Stein has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Extract shared function to compute current token > > test/jdk/tools/launcher/ArgFileSyntax.java line 177: > >> 17

Re: RFR: 8357862: Java argument file is parsed unexpectedly with trailing comment [v2]

2025-06-11 Thread David Beaumont
On Wed, 11 Jun 2025 08:30:18 GMT, Christian Stein 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` Co

Re: RFR: 8357862: Java argument file is parsed unexpectedly with trailing comment [v2]

2025-06-11 Thread Christian Stein
On Tue, 10 Jun 2025 08:15:58 GMT, Christian Stein wrote: >> Or the handling of `#` can be merged with the previous case ... somehow. > > Extracting a method wouldn't really simplify the code, as many local > variables are in play. > > Merging the cases also ends up in more if-else constructs in

Re: RFR: 8357862: Java argument file is parsed unexpectedly with trailing comment [v2]

2025-06-11 Thread Christian Stein
> 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](ht

Re: RFR: 8357862: Java argument file is parsed unexpectedly with trailing comment

2025-06-10 Thread Christian Stein
On Mon, 2 Jun 2025 16:03:49 GMT, Christian Stein wrote: >> right I agree that if there is common code we should extract it in a helper >> method > > Or the handling of `#` can be merged with the previous case ... somehow. Extracting a method wouldn't really simplify the code, as many local vari

Re: RFR: 8357862: Java argument file is parsed unexpectedly with trailing comment

2025-06-02 Thread Christian Stein
On Mon, 2 Jun 2025 15:08:49 GMT, Vicente Romero wrote: >> src/java.base/share/native/libjli/args.c line 276: >> >>> 274: } >>> 275: pctx->cptr = nextc + 1; >>> 276: return token; >> >> This code duplicates a large part of the block of

Re: RFR: 8357862: Java argument file is parsed unexpectedly with trailing comment

2025-06-02 Thread Christian Stein
On Mon, 2 Jun 2025 15:35:34 GMT, Vicente Romero wrote: > the fact that not including a space between the comment and the previous > element created havoc seems to indicate that the scanner is pretty fragile > and could break again in the future. We should probably file a follow up to > make th

Re: RFR: 8357862: Java argument file is parsed unexpectedly with trailing comment

2025-06-02 Thread Vicente Romero
On Mon, 2 Jun 2025 13:46:23 GMT, Christian Stein 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

Re: RFR: 8357862: Java argument file is parsed unexpectedly with trailing comment

2025-06-02 Thread Vicente Romero
On Mon, 2 Jun 2025 13:48:23 GMT, Christian Stein 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` Com

Re: RFR: 8357862: Java argument file is parsed unexpectedly with trailing comment

2025-06-02 Thread Christian Stein
On Mon, 2 Jun 2025 13:46:23 GMT, Christian Stein 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

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

2025-06-02 Thread Christian Stein
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.ora