commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1606000 - in /commons/proper/logging/trunk/src: changes/changes.xml test/java/org/apache/commons/logging/security/MockSecurityManager.java
Date Fri, 27 Jun 2014 09:36:27 GMT
Author: tn
Date: Fri Jun 27 09:36:27 2014
New Revision: 1606000

URL: http://svn.apache.org/r1606000
Log:
[LOGGING-156] Fix SecurityAllowedTestCase when run with OpenJDK 1.7. Thanks to Mikolaj Izdebski.

Modified:
    commons/proper/logging/trunk/src/changes/changes.xml
    commons/proper/logging/trunk/src/test/java/org/apache/commons/logging/security/MockSecurityManager.java

Modified: commons/proper/logging/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/logging/trunk/src/changes/changes.xml?rev=1606000&r1=1605999&r2=1606000&view=diff
==============================================================================
--- commons/proper/logging/trunk/src/changes/changes.xml (original)
+++ commons/proper/logging/trunk/src/changes/changes.xml Fri Jun 27 09:36:27 2014
@@ -44,6 +44,9 @@ The <action> type attribute can be add,u
   </properties>
   <body>
     <release version="1.2" date="TBD" description="TBD">
+      <action issue="LOGGING-156" dev="tn" type="fix" due-to="Mikolaj Izdebski">
+        Fix SecurityAllowedTestCase when executed with OpenJDK 1.7 due to an additional required
RuntimePermission.
+      </action>
       <action issue="LOGGING-157" dev="tn" type="fix" due-to="Ville Skyttä">
         Fix javadoc to comply with javadoc tool from jdk 1.8.
       </action>

Modified: commons/proper/logging/trunk/src/test/java/org/apache/commons/logging/security/MockSecurityManager.java
URL: http://svn.apache.org/viewvc/commons/proper/logging/trunk/src/test/java/org/apache/commons/logging/security/MockSecurityManager.java?rev=1606000&r1=1605999&r2=1606000&view=diff
==============================================================================
--- commons/proper/logging/trunk/src/test/java/org/apache/commons/logging/security/MockSecurityManager.java
(original)
+++ commons/proper/logging/trunk/src/test/java/org/apache/commons/logging/security/MockSecurityManager.java
Fri Jun 27 09:36:27 2014
@@ -95,6 +95,13 @@ public class MockSecurityManager extends
                 return;
             }
 
+            if (cname.equals("java.util.logging.Level") && stack[i].getMethodName().equals("getLocalizedLevelName"))
{
+                // LOGGING-156: OpenJDK 1.7 JULI code (java.util.logging.Level#getLocalizedLevelName)
+                // calls ResourceBundle#getBundle() without using AccessController#doPrivileged()
+                // requiring RuntimePermission: "accessClassInPackage.sun.util.logging.resources"
+                return;
+            }
+            
             if (cname.equals("java.security.AccessController")) {
                 // Presumably method name equals "doPrivileged"
                 //



Mime
View raw message