Affected version: all
Description:
MavenArchiver.handleSpecificationEntries() at line 422 compiles a regex pattern every time it is called:
Matcher matcher = Pattern.compile("([0-9]+\\.[0-9]+)(.*?)").matcher(version);
This pattern is constant and should be a private static final Pattern field. The current implementation compiles it on every manifest creation, creating unnecessary GC pressure.
Fix: Extract to a static field.
Affected version: all
Description:
MavenArchiver.handleSpecificationEntries()at line 422 compiles a regex pattern every time it is called:This pattern is constant and should be a
private static final Patternfield. The current implementation compiles it on every manifest creation, creating unnecessary GC pressure.Fix: Extract to a static field.