You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2020/09/18 22:07:59 UTC

[GitHub] [logging-log4j2] jvz commented on a change in pull request #392: [LOG4J2-2902] Add missing LoaderUtil permissions check

jvz commented on a change in pull request #392:
URL: https://github.com/apache/logging-log4j2/pull/392#discussion_r491215215



##########
File path: log4j-api/src/test/java/org/apache/logging/log4j/util/LoaderUtilTest.java
##########
@@ -55,4 +63,53 @@ public void systemClassLoader() {
             thread.setContextClassLoader(tccl);
         }
     }
+
+    @Test
+    public void securityManager() {
+        assertDoesNotThrow(() -> {
+            String separator = System.getProperty("path.separator");
+            List<URL> classpath = new ArrayList<>();
+            for (String entry : System.getProperty("java.class.path").split(separator)) {
+                classpath.add(new File(entry).toURL());

Review comment:
       Looks like this should be `new File(entry).toURI().toURL()` according to the javadoc.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org