harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r413013 - /incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/LoginContextTest_1.java
Date Fri, 09 Jun 2006 11:02:38 GMT
Author: smishura
Date: Fri Jun  9 04:02:37 2006
New Revision: 413013

URL: http://svn.apache.org/viewvc?rev=413013&view=rev
Log:
Removing dependency on policy in effect + adjusting imports

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/LoginContextTest_1.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/LoginContextTest_1.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/LoginContextTest_1.java?rev=413013&r1=413012&r2=413013&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/LoginContextTest_1.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/LoginContextTest_1.java
Fri Jun  9 04:02:37 2006
@@ -23,32 +23,28 @@
 
 import java.io.IOException;
 import java.net.URL;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-
 import java.security.AccessControlContext;
 import java.security.AccessController;
 import java.security.CodeSource;
 import java.security.DomainCombiner;
 import java.security.Permission;
-import java.security.PermissionCollection;
-import java.security.Policy;
-import java.security.PrivilegedExceptionAction;
+import java.security.Permissions;
 import java.security.PrivilegedAction;
+import java.security.PrivilegedExceptionAction;
 import java.security.ProtectionDomain;
 import java.security.Security;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
 
 import javax.security.auth.AuthPermission;
 import javax.security.auth.Subject;
 import javax.security.auth.SubjectDomainCombiner;
-import javax.security.auth.callback.CallbackHandler;
 import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
 import javax.security.auth.callback.UnsupportedCallbackException;
-import javax.security.auth.spi.LoginModule;
-
 import javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag;
+import javax.security.auth.spi.LoginModule;
 
 import junit.framework.TestCase;
 
@@ -2145,10 +2141,9 @@
         CodeSource cs = new CodeSource(new URL(
                 "http://127.0.0.1/no/such/path/i/do/believe."),
                 (java.security.cert.Certificate[]) null);
-        // the returned is empty set of permissions
-        PermissionCollection pc = Policy.getPolicy().getPermissions(cs);
+        // create a protection domain with an empty set of permissions
         ProtectionDomain[] pds = new ProtectionDomain[] { new ProtectionDomain(
-                cs, pc) };
+                cs, new Permissions()) };
         AccessControlContext acc = new AccessControlContext(pds);
 
         try {



Mime
View raw message