lukaszlenart commented on code in PR #830:
URL: https://github.com/apache/struts/pull/830#discussion_r1441366147


##########
plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java:
##########
@@ -438,30 +471,26 @@ private UrlSet buildUrlSet(List<URL> resourceUrls) throws 
IOException {
         }
 
         //try to find classes dirs inside war files
-        urlSet = urlSet.includeClassesUrl(classLoaderInterface, new 
UrlSet.FileProtocolNormalizer() {
-            public URL normalizeToFileProtocol(URL url) {
-                return fileManager.normalizeToFileProtocol(url);
-            }
-        });
-
+        urlSet = urlSet.includeClassesUrl(classLoaderInterface, url -> 
fileManager.normalizeToFileProtocol(url));
 
         urlSet = urlSet.excludeJavaExtDirs()
-                    .excludeJavaEndorsedDirs()
-                    .excludeUserExtensionsDir();
+            .excludeJavaEndorsedDirs()
+            .excludeUserExtensionsDir();
 
         try {
-               urlSet = urlSet.excludeJavaHome();
+            urlSet = urlSet.excludeJavaHome();
         } catch (NullPointerException e) {
-               // This happens in GAE since the sandbox contains no java.home 
directory
-           LOG.warn("Could not exclude JAVA_HOME, is this a sandbox jvm?");
+            // This happens in GAE since the sandbox contains no java.home 
directory
+            LOG.warn("Could not exclude JAVA_HOME, is this a sandbox jvm?");
         }
         urlSet = urlSet.excludePaths(System.getProperty("sun.boot.class.path", 
""));
         urlSet = urlSet.exclude(".*/JavaVM.framework/.*");
 
         if (includeJars == null) {
-            urlSet = urlSet.exclude(".*?\\.jar(!/|/)?");
+            LOG.debug("\"{}\" is not defined, excluding all JAR files!", 
ConventionConstants.CONVENTION_ACTION_INCLUDE_JARS);
+            urlSet = urlSet.exclude(EXCLUDE_ALL_JARS_PATTERN);

Review Comment:
   Yes, since JDK9 we can get either 
`jar:file:/.../org/codehaus/plexus/plexus-utils/3.4.1/plexus-utils-3.4.1.jar!/META-INF/versions/10/`
 or just 
`jar:file:/.../org/codehaus/plexus/plexus-utils/3.4.1/plexus-utils-3.4.1.jar!/`



-- 
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]

Reply via email to