elharo opened a new issue, #138:
URL: https://github.com/apache/maven-shared-jar/issues/138
In `JarClassesAnalysis.java:153-155`:
```java
JarVersionedRuntime rootContentVersionedRuntime =
runtimeVersionsMap.remove(ROOT);
jarData.setRootEntries(rootContentVersionedRuntime.getEntries()); // NPE if
no ROOT
```
If a malformed multi-release JAR has no root-level entries (every entry is
under `META-INF/versions/N/`), `runtimeVersionsMap` has no `ROOT` key,
`remove(ROOT)` returns `null`, and `.getEntries()` throws a
NullPointerException.
**Fix**: Guard against null:
```java
JarVersionedRuntime rootContent = runtimeVersionsMap.remove(ROOT);
if (rootContent != null) {
jarData.setRootEntries(rootContent.getEntries());
}
```
--
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]