On Thu, 5 Mar 2026 15:05:27 GMT, Alexey Semenyuk <[email protected]> wrote:
> For the "1.2.3+ea" string, the `DottedVersion.greedy()` function returns an
> instance whose `getUnprocessedSuffix()` returns ".3+ea". The expected value
> is "+ea".
>
> Fixed the implementation and added missing test cases.
>
> Additionally:
> - Added `trim()` and `pad()` methods.
> - Replaced `DottedVersion.DigitsSupplier.throwException(`) with
> `DottedVersion.DigitsSupplier.createException()` to increase coverage.
> Somehow, `throw ds.createException()` is marked as covered, and
> `ds.throwException()` is marked as uncovered. Probably because in the latter
> case, the call never returns.
src/jdk.jpackage/share/classes/jdk/jpackage/internal/model/DottedVersion.java
line 249:
> 247:
> 248: public String toComponentsString() {
> 249: return
> Stream.of(components).map(Component::parsedValue).map(BigInteger::toString).collect(Collectors.joining("."));
Why not same as `toString`, but without `suffix`? Also, `toString` can be
`toComponentsString` + `suffix`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/30080#discussion_r2893025239