apache / apache/maven-shared-jar
CLASS_FILTER in JarAnalyzer rejects underscores in Java class names
- Dominant language
- Java
- Stars
- 4
- Forks
- 9
- Avg merge
- 2h 46m
- Merged PRs (30d)
- 3
Description
In `JarAnalyzer.java:38`:
```java
private static final Pattern CLASS_FILTER = Pattern.compile("[A-Za-z0-9]*\\\\.class$");
```
The character class `[A-Za-z0-9]` excludes `_` (underscore), which is a legal character in Java class names. Any class like `My_Helper.class`, `some_test.class`, or `UPPER_CASE.class` inside the JAR is silently ignored and never analyzed. This causes incomplete class discovery, potentially missing packages, imports, and leading to incorrect JDK revision detection.
**Fix**: Add `_` to the character class: `[A-Za-z0-9_]*\\\\.class$`
Contributor guide
No contributing guide indexed for this repository
Research direction
Open JarAnalyzer.java and inspect the CLASS_FILTER declaration at line 38. Verify the filter against JAR entries whose class names contain underscores, such as My_Helper.class. Done means those classes are discovered and analyzed instead of being silently ignored.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 90/100