1
0

[LOGGING-156] Fix SecurityAllowedTestCase when run with OpenJDK 1.7. Thanks to Mikolaj Izdebski.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/logging/trunk@1606000 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart
2014-06-27 09:36:27 +00:00
parent d774fe0a54
commit 5b215c911a
2 changed files with 10 additions and 0 deletions

View File

@@ -44,6 +44,9 @@ The <action> type attribute can be add,update,fix,remove.
</properties> </properties>
<body> <body>
<release version="1.2" date="TBD" description="TBD"> <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ä"> <action issue="LOGGING-157" dev="tn" type="fix" due-to="Ville Skyttä">
Fix javadoc to comply with javadoc tool from jdk 1.8. Fix javadoc to comply with javadoc tool from jdk 1.8.
</action> </action>

View File

@@ -95,6 +95,13 @@ public class MockSecurityManager extends SecurityManager {
return; 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")) { if (cname.equals("java.security.AccessController")) {
// Presumably method name equals "doPrivileged" // Presumably method name equals "doPrivileged"
// //