On Sat, 5 Sep 2026 03:43:23 GMT, Yunbo Zhang <[email protected]> wrote:
> Please review this small fix. > > **Problem:** > > After parsing the version number, the parser enters the pre-release parsing > loop regardless of whether the delimiter was `-` or `+`. As a result, > build-only versions such as `1+1` are parsed as pre-release versions, causing > `1+1` to compare equal to `1-1`. > > **Fix:** > > Record whether the version number ended with `-`, and only parse the > pre-release component in that case. If it ended with `+`, proceed directly to > the build component. > > **Testing:** > > - Added regression cases to `VersionTest.java`. > - `make test TEST=test/jdk/java/lang/module`: 17 passed, 0 failed. > > > > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). The head branch is benshuai5D:codex/JDK-8250677. Can you say if any part of the changes in this PR were generated by codex? ------------- PR Comment: https://git.openjdk.org/jdk/pull/32715#issuecomment-5550041439
