diff --git a/src/test/java/org/apache/commons/logging/security/MockSecurityManager.java b/src/test/java/org/apache/commons/logging/security/MockSecurityManager.java index eae94c6..d9620f5 100644 --- a/src/test/java/org/apache/commons/logging/security/MockSecurityManager.java +++ b/src/test/java/org/apache/commons/logging/security/MockSecurityManager.java @@ -31,7 +31,7 @@ public class MockSecurityManager extends SecurityManager { private final Permissions permissions = new Permissions(); private static final Permission setSecurityManagerPerm = new RuntimePermission("setSecurityManager"); - + private int untrustedCodeCount = 0; public MockSecurityManager() { @@ -52,7 +52,7 @@ public class MockSecurityManager extends SecurityManager { * value indicates a bug in JCL, ie a situation where code was not * correctly wrapped in an AccessController block. The result of such a * bug is that signing JCL is not sufficient to allow JCL to perform - * the operation; the caller would need to be signed too. + * the operation; the caller would need to be signed too. */ public int getUntrustedCodeCount() { return untrustedCodeCount; @@ -81,13 +81,19 @@ public class MockSecurityManager extends SecurityManager { Exception e = new Exception(); e.fillInStackTrace(); StackTraceElement[] stack = e.getStackTrace(); - + // scan the call stack from most recent to oldest. // start at 1 to skip the entry in the stack for this method for(int i=1; i