laeubi commented on code in PR #21:
URL: https://github.com/apache/maven-shared-jar/pull/21#discussion_r1221865369
##########
src/main/java/org/apache/maven/shared/jar/classes/JarClassesAnalysis.java:
##########
@@ -51,8 +57,18 @@
@Named
@SuppressWarnings("checkstyle:MagicNumber")
public class JarClassesAnalysis {
+
private final Logger logger = LoggerFactory.getLogger(getClass());
+ /**
+ * Constant representing the classes in the root of a Multi-Release JAR
file.
+ * Meaning outside of any given META-INF/versions/NN/... entry.
+ */
+ private static final Integer ROOT = 0;
+
+ private static final Pattern CLASS_FILTER_MULTI_RELEASE =
+ Pattern.compile("^META-INF/versions/(\\d{1,2})/.*\\.class$");
Review Comment:
@michael-o see the Java Spec here:
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/jar/JarFile.html#getJarEntry(java.lang.String)
so the `getJarEntry` does not restrict it to classes only, so resource
*should* work the same way!
--
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]