elharo opened a new issue, #67:
URL: https://github.com/apache/maven-mapping/issues/67
## Description
In `MappingUtils.java:90`, the `RegexBasedInterpolator` is constructed with:
```java
new RegexBasedInterpolator("\\@\\{(", ")?([^}]+)\\}@");
```
The prefix contains an opening `(` and the suffix starts with `)?`, forming
an empty optional capture group `()?` that spans across the interpolator's
internal key capture pattern. This group is never used for anything and is
functionally dead regex.
The same result could be achieved with the simpler:
```java
new RegexBasedInterpolator("\\@\\{", "\\}@");
```
## Impact
No functional impact, but the unnecessary complexity obscures the intent and
may confuse future contributors.
## Relevant code
`src/main/java/org/apache/maven/shared/mapping/MappingUtils.java:90`
--
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]