efegokdemir commented on code in PR #178:
URL: https://github.com/apache/maven-shared-jar/pull/178#discussion_r4234976790
##########
src/test/java/org/apache/maven/shared/jar/classes/JarClassesAnalyzerTest.java:
##########
@@ -346,6 +352,55 @@ void analyzeMultiReleaseJarResourcesOnly() {
"It should not raise an exception");
}
+ @Test
+ void analyzeMultiReleaseJarWithoutRootClassEntries() throws Exception {
+ File jarFile = File.createTempFile("multi-release-no-root", ".jar");
+ try {
+ try (JarFile sourceJar = new
JarFile(getSampleJar("helloworld-9.jar"));
+ JarOutputStream output =
+ new JarOutputStream(new FileOutputStream(jarFile),
multiReleaseManifest())) {
Review Comment:
Fixed in `5d9b05f2fb37e4f3973aae834903582083d3bc72`. When no ROOT bucket
exists, analysis now records empty root entries and an empty root `JarClasses`.
The regression test filters the analyzer entry view to versioned entries, so it
reaches the missing-ROOT branch; I confirmed it fails with the old dereference.
`mvn -Dtest=JarClassesAnalyzerTest test` (36 tests), full `mvn test`, Spotless
and `git diff --check` pass.
--
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]