elharo opened a new issue, #134:
URL: https://github.com/apache/maven-shared-jar/issues/134
In `FilenameExposer.java:35-40`, the regex only matches a single digit:
```java
private static final Pattern VERSION_PATTERN = Pattern.compile("-\\\\d");
// only matches single digit!
// ...
identification.addVersion(filename.substring(mat.end() - 1));
```
For a file like `my-lib-12.3.4.jar`:
- `mat.find()` matches `-1` at position 6-8
- `mat.end() - 1` = 7 ⇒ `filename.substring(7)` = `2.3.4`
The expected result is `12.3.4`. The pattern `-\\\\d` only matches `-`
followed by a **single** digit, so any version starting with a multi-digit
number (e.g., `10`, `12`, `21`) gets its first digit lopped off. This produces
incorrect artifact identification for versions >= 10.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]