Copilot commented on code in PR #890:
URL:
https://github.com/apache/maven-shade-plugin/pull/890#discussion_r4437382981
##########
src/main/java/org/apache/maven/plugins/shade/PlatformModuleIndex.java:
##########
@@ -100,34 +110,126 @@ private void readHistoricalReleases() throws
MojoExecutionException {
return;
}
try (JarFile archive = new JarFile(ctSym)) {
- Enumeration<JarEntry> entries = archive.entries();
- while (entries.hasMoreElements()) {
- JarEntry entry = entries.nextElement();
+ List<JarEntry> entries = Collections.list(archive.entries());
+ boolean legacyLayout = usesLegacyLayout(entries);
+ for (JarEntry entry : entries) {
Review Comment:
Legacy ownership resolution depends on ZIP entry order because class
signatures are resolved before all module descriptors have been read. If
`9/javax/xml/parsers/Parser.sig` precedes its descriptor in the new fixture,
its ownership is permanently dropped because it has no current-jmod fallback.
Read all legacy module descriptors before class signatures, and add a
class-first regression case.
--
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]