harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r451857 [1/4] - in /incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java: common/javax/security/auth/ common/javax/security/auth/callback/ common/javax/security/auth/kerberos/ common/javax/security/auth/login/ common/javax/s...
Date Mon, 02 Oct 2006 02:52:43 GMT
Author: ndbeyer
Date: Sun Oct  1 19:52:40 2006
New Revision: 451857

URL: http://svn.apache.org/viewvc?view=rev&rev=451857
Log:
Revert auth module test source cleanup.

Removed:
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/sasl/cbHand.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/sasl/cbHandN.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/sasl/myClientFactory01.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/sasl/myClientFactory02.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/sasl/mySaslClientFactory.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/sasl/mySaslClientFactoryExt.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/sasl/mySaslServerFactory.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/sasl/mySaslServerFactoryExt.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/sasl/myServerFactory01.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/sasl/myServerFactory02.java
Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/AuthPermissionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/PolicyTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/PrivateCredentialPermissionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/SubjectTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/callback/ConfirmationCallbackTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/callback/TextOutputCallbackTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/kerberos/DelegationPermissionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/kerberos/KerberosKeyTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/kerberos/ServicePermissionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/AppConfigurationEntryTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/ConfigurationTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/LoginContextTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/LoginContextTest_1.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/x500/X500PrincipalTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/x500/X500PrivateCredentialTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/sasl/AuthenticationExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/sasl/AuthorizeCallbackTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/sasl/RealmCallbackTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/sasl/RealmChoiceCallbackTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/sasl/Sasl1Test.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/sasl/Sasl2Test.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/sasl/Sasl3Test.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/sasl/Sasl4Test.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/sasl/SaslExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/internal/SecurityTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/login/DefaultConfigParserTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/login/DefaultConfigurationTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/ChoiceCallbackTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/ConfirmationCallbackTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/LanguageCallbackTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/NameCallbackTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/PasswordCallbackTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/TextInputCallbackTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/TextOutputCallbackTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/UnsupportedCallbackExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/DelegationPermissionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/KrbDelegationPermissionCollectionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/KrbServicePermissionCollectionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/ServicePermissionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/LoginContextTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountExpiredExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountLockedExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountNotFoundExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/CredentialExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/CredentialExpiredExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/CredentialNotFoundExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/FailedLoginExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/LoginExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/AuthPermissionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/DestroyFailedExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/PrivateCredentialPermissionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/RefreshFailedExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/SubjectTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/x500/serialization/X500PrincipalTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/sasl/serialization/AuthenticationExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/sasl/serialization/AuthorizeCallbackTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/sasl/serialization/RealmCallbackTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/sasl/serialization/RealmChoiceCallbackTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/sasl/serialization/SaslExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/module/Krb5LoginModuleTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/support/SecurityChecker.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/support/SpiEngUtils.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/ietf/jgss/GSSManagerTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/ietf/jgss/OidTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/linux/org/apache/harmony/auth/module/UnixLoginModuleTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/windows/org/apache/harmony/auth/module/NTLoginModuleTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/AuthPermissionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/AuthPermissionTest.java?view=diff&rev=451857&r1=451856&r2=451857
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/AuthPermissionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/AuthPermissionTest.java Sun Oct  1 19:52:40 2006
@@ -37,7 +37,6 @@
     }
 
    
-    @Override
     protected void setUp() throws Exception {
         ap = new AuthPermission("name");
         ap1 = new AuthPermission("createLoginContext");

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/PolicyTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/PolicyTest.java?view=diff&rev=451857&r1=451856&r2=451857
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/PolicyTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/PolicyTest.java Sun Oct  1 19:52:40 2006
@@ -15,6 +15,11 @@
  *  limitations under the License.
  */
 
+/**
+* @author Alexey V. Varlamov
+* @version $Revision$
+*/
+
 package javax.security.auth;
 
 import java.io.File;
@@ -38,9 +43,12 @@
 /**
  * Tests Policy class
  */
-@SuppressWarnings("deprecation")
 public class PolicyTest extends TestCase {
 
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(PolicyTest.class);
+    }
+
     /**
      * Tests that setPolicy() is properly secured via SecurityManager.
      */
@@ -102,13 +110,11 @@
 
     public static class TestProvider extends Policy {
 
-        @Override
         public PermissionCollection getPermissions(Subject subject,
                 CodeSource cs) {
             return null;
         }
 
-        @Override
         public void refresh() {
         }
     }
@@ -182,7 +188,7 @@
         PermissionCollection c;
         Permission per;
         Subject subject;
-        Enumeration<Permission> e;
+        Enumeration e;
         CodeSource source;
 
         String oldProp = System.getProperty(POLICY_PROP);
@@ -231,7 +237,7 @@
 
             e = p.getPermissions(subject, null).elements();
 
-            per = e.nextElement();
+            per = (Permission) e.nextElement();
             assertFalse("Elements: ", e.hasMoreElements());
             assertEquals("Permission: ", per, new FilePermission("/home/duke",
                     "read, write"));
@@ -259,7 +265,7 @@
             subject.getPrincipals().add(new MyPrincipal("dummy"));
 
             e = p.getPermissions(subject, source).elements();
-            per = e.nextElement();
+            per = (Permission) e.nextElement();
             assertFalse("Elements: ", e.hasMoreElements());
             assertEquals("Permission: ", per, new RuntimePermission(
                     "createClassLoader"));
@@ -290,7 +296,7 @@
 
             subject.getPrincipals().add(new OtherPrincipal("other"));
             e = p.getPermissions(subject, null).elements();
-            per = e.nextElement();
+            per = (Permission) e.nextElement();
             assertFalse("Elements: ", e.hasMoreElements());
             assertEquals("Permission: ", per, new AllPermission());
 
@@ -303,8 +309,8 @@
             e = p.getPermissions(subject, null).elements();
 
             Permission[] get = new Permission[2];
-            get[0] = e.nextElement();
-            get[1] = e.nextElement();
+            get[0] = (Permission) e.nextElement();
+            get[1] = (Permission) e.nextElement();
             assertFalse("Elements: ", e.hasMoreElements());
 
             Permission[] set = new Permission[2];
@@ -327,7 +333,7 @@
 
         Permission per;
         Subject subject;
-        Enumeration<Permission> e;
+        Enumeration e;
 
         String oldProp = System.getProperty(POLICY_PROP);
         try {
@@ -344,7 +350,7 @@
 
             e = p.getPermissions(subject, null).elements();
 
-            per = e.nextElement();
+            per = (Permission) e.nextElement();
             assertFalse("Elements: ", e.hasMoreElements());
             assertEquals("Permission: ", per, new FilePermission("/home/duke",
                     "read, write"));
@@ -358,7 +364,7 @@
 
             e = p.getPermissions(subject, null).elements();
 
-            per = e.nextElement();
+            per = (Permission) e.nextElement();
             assertFalse("Elements: ", e.hasMoreElements());
             assertEquals("Permission: ", per, new RuntimePermission(
                     "createClassLoader"));

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/PrivateCredentialPermissionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/PrivateCredentialPermissionTest.java?view=diff&rev=451857&r1=451856&r2=451857
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/PrivateCredentialPermissionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/PrivateCredentialPermissionTest.java Sun Oct  1 19:52:40 2006
@@ -14,6 +14,10 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
+/**
+* @author Maxim V. Makarov
+* @version $Revision$
+*/
 
 package javax.security.auth;
 
@@ -40,6 +44,19 @@
 
     String s_this;
 
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(PrivateCredentialPermissionTest.class);
+    }
+
+    /**
+     * Constructor for PrivateCredentialPermissionTest.
+     * 
+     * @param name
+     */
+    public PrivateCredentialPermissionTest(String name) {
+        super(name);
+    }
+
     /**
      * [C1 P1 "duke"] implies [C1 P1 "duke" P2 "nuke"]. 
      */
@@ -630,7 +647,7 @@
 
         MyPrincipal mp = new MyPrincipal("duke");
         MyPrincipal mp1 = new MyPrincipal("nuke");
-        HashSet<Principal> hash = new HashSet<Principal>();
+        HashSet hash = new HashSet();
         hash.add(mp);
         hash.add(mp1);
 
@@ -644,7 +661,7 @@
         assertTrue(p2.implies(p1));
 
         PrivateCredentialPermission p3 = new PrivateCredentialPermission(
-                "java.lang.Object", new HashSet<Principal>());
+                "java.lang.Object", new HashSet());
 
         PrivateCredentialPermission p4 = new PrivateCredentialPermission(
                 "java.lang.Object * \"*\"", "read");
@@ -680,9 +697,9 @@
                 "a b  \"c\"" // two spaces between principal class and name
         };
 
-        for (String element : illegalTargetNames) {
+        for (int i = 0; i < illegalTargetNames.length; i++) {
             try {
-                new PrivateCredentialPermission(element, "read");
+                new PrivateCredentialPermission(illegalTargetNames[i], "read");
                 fail("No expected IllegalArgumentException");
             } catch (IllegalArgumentException e) {
             }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/SubjectTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/SubjectTest.java?view=diff&rev=451857&r1=451856&r2=451857
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/SubjectTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/SubjectTest.java Sun Oct  1 19:52:40 2006
@@ -15,6 +15,11 @@
  *  limitations under the License.
  */
 
+/**
+* @author Stepan M. Mishura
+* @version $Revision$
+*/
+
 package javax.security.auth;
 
 import java.io.ByteArrayInputStream;
@@ -43,7 +48,7 @@
 
 
 /**
- * Tests Subject and its inner classes implementation. 
+ * Tests Subject and its innner classes implementation. 
  */
 
 public class SubjectTest extends SecurityTest {
@@ -54,47 +59,51 @@
         }
     };
 
-    PrivilegedAction<?> emptyPAction = new PrivilegedAction<Object>() {
+    PrivilegedAction emptyPAction = new PrivilegedAction() {
         public Object run() {
             return null;
         }
     };
 
-    PrivilegedExceptionAction<?> emptyPEAction = new PrivilegedExceptionAction<Object>() {
+    PrivilegedExceptionAction emptyPEAction = new PrivilegedExceptionAction() {
         public Object run() {
             return null;
         }
     };
 
-    PrivilegedAction<AccessControlContext> contextPAction = new PrivilegedAction<AccessControlContext>() {
-        public AccessControlContext run() {
+    PrivilegedAction contextPAction = new PrivilegedAction() {
+        public Object run() {
             return AccessController.getContext();
         }
     };
 
-    PrivilegedExceptionAction<AccessControlContext> contextPEAction = new PrivilegedExceptionAction<AccessControlContext>() {
-        public AccessControlContext run() {
+    PrivilegedExceptionAction contextPEAction = new PrivilegedExceptionAction() {
+        public Object run() {
             return AccessController.getContext();
         }
     };
 
-    PrivilegedAction<Subject> subjectPAction = new PrivilegedAction<Subject>() {
-        public Subject run() {
+    PrivilegedAction subjectPAction = new PrivilegedAction() {
+        public Object run() {
             return Subject.getSubject(AccessController.getContext());
         }
     };
 
-    PrivilegedExceptionAction<Subject> subjectPEAction = new PrivilegedExceptionAction<Subject>() {
-        public Subject run() {
+    PrivilegedExceptionAction subjectPEAction = new PrivilegedExceptionAction() {
+        public Object run() {
             return Subject.getSubject(AccessController.getContext());
         }
     };
 
-    private final HashSet<Principal> h1 = new HashSet<Principal>(); // principals
+    private HashSet h1 = new HashSet(); // principals
+
+    private HashSet h2 = new HashSet(); // public credentials
 
-    private final HashSet<Object> h2 = new HashSet<Object>(); // public credentials
+    private HashSet h3 = new HashSet(); // private credentials
 
-    private final HashSet<Object> h3 = new HashSet<Object>(); // private credentials gd
+    public static void main(String[] args) throws Exception {
+        junit.textui.TestRunner.run(javax.security.auth.SubjectTest.suite());
+    }
 
     public static Test suite() throws Exception {
 
@@ -194,19 +203,19 @@
     public final void testSubject_3Set_NPE() {
 
         try {
-            new Subject(false, null, new HashSet<Object>(), new HashSet<Object>());
+            new Subject(false, null, new HashSet(), new HashSet());
             fail("No expected NullPointerException");
         } catch (NullPointerException e) {
         }
 
         try {
-            new Subject(false, new HashSet<Principal>(), null, new HashSet<Object>());
+            new Subject(false, new HashSet(), null, new HashSet());
             fail("No expected NullPointerException");
         } catch (NullPointerException e) {
         }
 
         try {
-            new Subject(false, new HashSet<Principal>(), new HashSet<Object>(), null);
+            new Subject(false, new HashSet(), new HashSet(), null);
             fail("No expected NullPointerException");
         } catch (NullPointerException e) {
         }
@@ -216,7 +225,6 @@
      * Testing Subject(boolean,Set,Set,Set) constructor.
      * Parameter set contains an invalid element.
      */
-    @SuppressWarnings("unchecked")
     public final void testSubject_3Set_InvalidSet() {
         HashSet hash = new HashSet();
 
@@ -233,7 +241,7 @@
         }
 
         try {
-            new Subject(false, new HashSet<Principal>(), hash, new HashSet<Object>());
+            new Subject(false, new HashSet(), hash, new HashSet());
 
             if (!testing) {
                 fail("No expected NullPointerException");
@@ -242,7 +250,7 @@
         }
 
         try {
-            new Subject(false, new HashSet<Principal>(), new HashSet<Object>(), hash);
+            new Subject(false, new HashSet(), new HashSet(), hash);
 
             if (!testing) {
                 fail("No expected NullPointerException");
@@ -499,10 +507,10 @@
 
         // empty sets
         Subject s1 = new Subject();
-        Subject s2 = new Subject(false, new HashSet<Principal>(), new HashSet<Object>(),
-                new HashSet<Object>());
-        Subject s3 = new Subject(true, new HashSet<Principal>(), new HashSet<Object>(),
-                new HashSet<Object>());
+        Subject s2 = new Subject(false, new HashSet(), new HashSet(),
+                new HashSet());
+        Subject s3 = new Subject(true, new HashSet(), new HashSet(),
+                new HashSet());
 
         equalsTest(s1, s2, s3);
 
@@ -520,7 +528,7 @@
 
         // not equal subjects
         s1 = new Subject();
-        s2 = new Subject(true, h1, new HashSet<Object>(), h3);
+        s2 = new Subject(true, h1, new HashSet(), h3);
         s3 = new Subject(true, h1, h2, h3);
 
         assertFalse(s1.equals(s2));
@@ -568,35 +576,35 @@
 
         grantMode(); // no permissions
 
-        HashSet<Principal> hash = new HashSet<Principal>();
+        HashSet hash = new HashSet();
         hash.add(principal);
 
-        Subject subject1 = new Subject(false, new HashSet<Principal>(), new HashSet<Object>(),
+        Subject subject1 = new Subject(false, new HashSet(), new HashSet(),
                 hash);
 
         //doesn't verify private credential permissions on itself
         assertTrue(subject1.equals(subject1));
 
-        // principals comparison goes before
+        // principals comparision goes before
         // no SecurityException expected 
-        Subject subject2 = new Subject(false, hash, new HashSet<Object>(), hash);
+        Subject subject2 = new Subject(false, hash, new HashSet(), hash);
 
         assertFalse(subject1.equals(subject2));
 
-        // public credential comparison goes before
+        // public credential comparision goes before
         // no SecurityException expected 
-        subject2 = new Subject(false, new HashSet<Principal>(), hash, hash);
+        subject2 = new Subject(false, new HashSet(), hash, hash);
 
         assertFalse(subject1.equals(subject2));
 
-        // principal and public credentials sets are equal
+        // principal and public credentils sets are equal
         // Expected: SecurityException
-        subject2 = new Subject(false, new HashSet<Principal>(), new HashSet<Object>(), hash);
+        subject2 = new Subject(false, new HashSet(), new HashSet(), hash);
         try {
             subject1.equals(subject2);
             fail("No expected AccessControlException");
         } catch (AccessControlException e) {
-            assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+            assertEquals(e, PrivateCredentialPermission.class);
         }
     }
 
@@ -621,7 +629,7 @@
             subThis.getPrivateCredentials().iterator().next();
             fail("No expected AccessControlException");
         } catch (AccessControlException e) {
-            assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+            assertEquals(e, PrivateCredentialPermission.class);
         }
         subThat.getPrivateCredentials().iterator().next();
 
@@ -630,7 +638,7 @@
             subThis.equals(subThat);
             fail("No expected AccessControlException");
         } catch (AccessControlException e) {
-            assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+            assertEquals(e, PrivateCredentialPermission.class);
         }
 
         // provided subject doesn't have permission
@@ -638,7 +646,7 @@
             subThat.equals(subThis);
             fail("No expected AccessControlException");
         } catch (AccessControlException e) {
-            assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+            assertEquals(e, PrivateCredentialPermission.class);
         }
     }
 
@@ -646,7 +654,7 @@
      * Tests Subject.get<set>(Class) methods
      */
     public final void testGetSetClass() {
-        HashSet<MyClass1> hash = new HashSet<MyClass1>();
+        HashSet hash = new HashSet();
 
         MyClass1 p1 = new MyClass1();
         MyClass1 p2 = new MyClass1();
@@ -654,7 +662,7 @@
         hash.add(p1);
         hash.add(p2);
 
-        HashSet<Principal> h = new HashSet<Principal>();
+        HashSet h = new HashSet();
 
         h.add(principal);
         h.addAll(hash);
@@ -738,10 +746,10 @@
      */
     public final void test_getSubject_NotSameSubject() {
 
-        final HashSet<MyClass1> hash = new HashSet<MyClass1>();
+        final HashSet hash = new HashSet();
         hash.add(new MyClass1());
 
-        PrivilegedAction<?> action = new PrivilegedAction<Object>() {
+        PrivilegedAction action = new PrivilegedAction() {
             public Object run() {
 
                 return Subject.doAs(new Subject(false, hash, hash, hash),
@@ -767,7 +775,7 @@
      */
     public final void test_getSubject_PrivilegedAction() {
 
-        PrivilegedAction<?> action = new PrivilegedAction<Object>() {
+        PrivilegedAction action = new PrivilegedAction() {
             public Object run() {
                 return AccessController.doPrivileged(subjectPAction);
             }
@@ -804,7 +812,7 @@
                 fail("No expected AccessControlException");
             }
         } catch (AccessControlException e) {
-            assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+            assertEquals(e, PrivateCredentialPermission.class);
         }
     }
 
@@ -1421,7 +1429,7 @@
 
     public static class PermissionTest extends SecurityTest {
 
-        private final Subject subject = new Subject();
+        private Subject subject = new Subject();
 
         /*
          * FIXME??? presence of unaccessible element
@@ -1435,11 +1443,11 @@
             Principal privCr1 = new MyClass1();
             Object privCr2 = new Object();
 
-            HashSet<Object> hash = new HashSet<Object>();
+            HashSet hash = new HashSet();
             hash.add(privCr1);
             hash.add(new Object());
 
-            Set<Object> set = subject.getPrivateCredentials();
+            Set set = subject.getPrivateCredentials();
 
             // Adding is not prohibited
             set.add(privCr1);
@@ -1451,31 +1459,31 @@
                 fail("No expected AccessControlException");
             } catch (AccessControlException e) {
                 // PrivateCredentialPermission check goes first
-                assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+                assertEquals(e, PrivateCredentialPermission.class);
             }
 
             try {
                 set.contains(privCr1);
                 fail("No expected AccessControlException");
             } catch (AccessControlException e) {
-                assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+                assertEquals(e, PrivateCredentialPermission.class);
             }
 
             try {
                 set.contains(new Object());
                 fail("No expected AccessControlException");
             } catch (AccessControlException e) {
-                assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+                assertEquals(e, PrivateCredentialPermission.class);
             }
 
             assertTrue(set.equals(set));
-            assertFalse(set.equals(new HashSet<Object>()));
+            assertFalse(set.equals(new HashSet()));
             try {
                 // set with equal size initiates iteration
                 set.equals(hash);
                 fail("No expected AccessControlException");
             } catch (AccessControlException e) {
-                assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+                assertEquals(e, PrivateCredentialPermission.class);
             }
 
             set.isEmpty();
@@ -1484,7 +1492,7 @@
                 set.hashCode();
                 fail("No expected AccessControlException");
             } catch (AccessControlException e) {
-                assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+                assertEquals(e, PrivateCredentialPermission.class);
             }
 
             try {
@@ -1492,7 +1500,7 @@
                 fail("No expected AccessControlException");
             } catch (AccessControlException e) {
                 // PrivateCredentialPermission check goes first
-                assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+                assertEquals(e, PrivateCredentialPermission.class);
             }
 
             try {
@@ -1500,29 +1508,29 @@
                 fail("No expected AccessControlException");
             } catch (AccessControlException e) {
                 // PrivateCredentialPermission check goes first
-                assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+                assertEquals(e, PrivateCredentialPermission.class);
             }
 
             try {
-                set.retainAll(new HashSet<Object>());
+                set.retainAll(new HashSet());
                 fail("No expected AccessControlException");
             } catch (AccessControlException e) {
                 // PrivateCredentialPermission check goes first
-                assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+                assertEquals(e, PrivateCredentialPermission.class);
             }
 
             try {
                 set.toArray();
                 fail("No expected AccessControlException");
             } catch (AccessControlException e) {
-                assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+                assertEquals(e, PrivateCredentialPermission.class);
             }
 
             try {
                 set.toArray(new Object[5]);
                 fail("No expected AccessControlException");
             } catch (AccessControlException e) {
-                assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+                assertEquals(e, PrivateCredentialPermission.class);
             }
         }
 
@@ -1544,31 +1552,31 @@
 
             subject.getPrincipals().add(new MyClass1());
 
-            Set<Object> set = subject.getPrivateCredentials();
+            Set set = subject.getPrivateCredentials();
 
             Object obj1 = new Object();
             Object obj2 = new Object();
             Object obj3 = new Object();
 
             set.add(obj1);
-            set.add(new HashSet<Object>());
+            set.add(new HashSet());
             set.add(obj2);
-            set.add(new HashSet<Object>());
+            set.add(new HashSet());
             set.add(obj3);
 
             grantMode(); // no permissions
 
-            HashSet<Object> hash = new HashSet<Object>();
+            HashSet hash = new HashSet();
 
             grantPermission(new PrivateCredentialPermission(
                     "java.lang.Object * \"*\"", "read"));
 
-            Iterator<Object> it = set.iterator();
+            Iterator it = set.iterator();
             while (it.hasNext()) {
                 try {
                     hash.add(it.next());
                 } catch (AccessControlException e) {
-                    assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+                    assertEquals(e, PrivateCredentialPermission.class);
                 }
             }
 
@@ -1595,7 +1603,7 @@
                 }
 
                 P p = new P();
-                HashSet<Principal> hash = new HashSet<Principal>();
+                HashSet hash = new HashSet();
                 hash.add(p);
 
                 PrivateCredentialPermission p1 = new PrivateCredentialPermission(
@@ -1612,7 +1620,7 @@
             PrivateCredentialPermission p3 = new PrivateCredentialPermission(
                     "java.lang.Object * \"*\"", "read");
             PrivateCredentialPermission p4 = new PrivateCredentialPermission(
-                    "java.lang.Object", new HashSet<Principal>());
+                    "java.lang.Object", new HashSet());
 
             assertTrue(p3.implies(p4));
         }
@@ -1622,10 +1630,10 @@
             Principal p1 = new MyClass1();
             Principal p2 = new MyClass2();
 
-            HashSet<Principal> hash = new HashSet<Principal>();
+            HashSet hash = new HashSet();
             hash.add(p2);
 
-            Set<Object> set = subject.getPrivateCredentials();
+            Set set = subject.getPrivateCredentials();
 
             set.add(new Object());
 
@@ -1634,7 +1642,7 @@
             grantPermission(new AuthPermission("modifyPrincipals"));
             grantPermission(getPermission("java.lang.Object", hash));
 
-            Iterator<Object> it = set.iterator();
+            Iterator it = set.iterator();
             it.next();
 
             subject.getPrincipals().add(p1);
@@ -1643,7 +1651,7 @@
                 it.next();
                 fail("No expected AccessControlException");
             } catch (AccessControlException e) {
-                assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+                assertEquals(e, PrivateCredentialPermission.class);
             }
 
             subject.getPrincipals().add(p2);
@@ -1665,7 +1673,7 @@
                 sOut.writeObject(subject.getPrivateCredentials());
                 fail("No expected AccessControlException");
             } catch (AccessControlException e) {
-                assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+                assertEquals(e, PrivateCredentialPermission.class);
             } finally {
                 sOut.close();
             }
@@ -1673,7 +1681,7 @@
 
         public void testGetClass() {
 
-            HashSet<Principal> hash = new HashSet<Principal>();
+            HashSet hash = new HashSet();
             hash.add(new MyClass1());
 
             subject.getPrincipals().add(new MyClass1());
@@ -1687,14 +1695,14 @@
                 subject.getPrivateCredentials(MyClass1.class);
                 fail("No expected AccessControlException");
             } catch (AccessControlException e) {
-                assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+                assertEquals(e, PrivateCredentialPermission.class);
             }
 
             try {
                 subject.getPrivateCredentials(MyClass2.class);
                 fail("No expected AccessControlException");
             } catch (AccessControlException e) {
-                assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+                assertEquals(e, PrivateCredentialPermission.class);
             }
 
             // subject hash partial permissions (only for MyClass1 class)
@@ -1706,14 +1714,14 @@
                 subject.getPrivateCredentials(MyClass1.class);
                 fail("No expected AccessControlException");
             } catch (AccessControlException e) {
-                assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+                assertEquals(e, PrivateCredentialPermission.class);
             }
 
             try {
                 subject.getPrivateCredentials(MyClass2.class);
                 fail("No expected AccessControlException");
             } catch (AccessControlException e) {
-                assertEquals(PrivateCredentialPermission.class, e.getPermission().getClass());
+                assertEquals(e, PrivateCredentialPermission.class);
             }
 
             // now subject has all permissions 
@@ -1723,10 +1731,10 @@
             subject.getPrivateCredentials(MyClass2.class);
         }
 
-        public PrivateCredentialPermission getPermission(String c, Set<Principal> p) {
+        public PrivateCredentialPermission getPermission(String c, Set p) {
             StringBuffer buf = new StringBuffer(c);
 
-            for (Iterator<Principal> it = p.iterator(); it.hasNext();) {
+            for (Iterator it = p.iterator(); it.hasNext();) {
                 Object o = it.next();
                 buf.append(" ");
                 buf.append(o.getClass().getName());
@@ -1847,9 +1855,16 @@
         }
     }
 
-    @SuppressWarnings("serial")
-    public static class MyClass1 implements Principal, Serializable {
+    /*
+     * 
+     *
+     * 
+     * 
+     * 
+     *  
+     */
 
+    public static class MyClass1 implements Principal, Serializable {
         public String getName() {
             return "MyClass1";
         }
@@ -1861,7 +1876,6 @@
         }
     }
 
-    @SuppressWarnings("serial")
     public static class MyObject implements Serializable {
     }
 
@@ -1905,14 +1919,13 @@
         public static class IteratorReadOnly extends
                 SecurityTest.ReadOnlyIteratorTest {
 
-            private final Subject subject = new Subject();
+            private Subject subject = new Subject();
 
             public IteratorReadOnly() {
                 set = subject.getPrincipals();
                 element = principal;
             }
 
-            @Override
             public void setReadOnly() {
                 subject.setReadOnly();
             }
@@ -1926,7 +1939,6 @@
                 element = principal;
             }
 
-            @Override
             public void setSecure() {
                 denyPermission(new AuthPermission("modifyPrincipals"));
             }
@@ -1959,14 +1971,13 @@
         }
 
         public static class ReadOnlySet extends SecurityTest.ReadOnlySetTest {
-            private final Subject subject = new Subject();
+            private Subject subject = new Subject();
 
             public ReadOnlySet() {
                 set = subject.getPrincipals();
                 element = principal;
             }
 
-            @Override
             public void setReadOnly() {
                 subject.setReadOnly();
             }
@@ -1979,7 +1990,6 @@
                 element = principal;
             }
 
-            @Override
             public void setSecure() {
                 denyPermission(new AuthPermission("modifyPrincipals"));
             }
@@ -2031,7 +2041,6 @@
                 element = principal;
             }
 
-            @Override
             public void testNext_EmptySet_NoSuchElementException() {
 
                 if (testing) {
@@ -2045,7 +2054,6 @@
                 }
             }
 
-            @Override
             public void testNext_NoSuchElementException() {
                 if (testing) {
                     //Unexpected: IndexOutOfBoundsException
@@ -2062,19 +2070,17 @@
         public static class IteratorReadOnly extends
                 SecurityTest.ReadOnlyIteratorTest {
 
-            private final Subject subject = new Subject();
+            private Subject subject = new Subject();
 
             public IteratorReadOnly() {
                 set = subject.getPrivateCredentials();
                 element = principal;
             }
 
-            @Override
             public void setReadOnly() {
                 subject.setReadOnly();
             }
 
-            @Override
             public void testNext_EmptySet_NoSuchElementException() {
 
                 if (testing) {
@@ -2088,7 +2094,6 @@
                 }
             }
 
-            @Override
             public void testNext_NoSuchElementException() {
                 if (testing) {
                     //Unexpected: IndexOutOfBoundsException
@@ -2110,12 +2115,10 @@
                 element = principal;
             }
 
-            @Override
             public void setSecure() {
                 denyPermission(new AuthPermission("modifyPrivateCredentials"));
             }
 
-            @Override
             public void testNext_EmptySet_NoSuchElementException() {
 
                 if (testing) {
@@ -2129,7 +2132,6 @@
                 }
             }
 
-            @Override
             public void testNext_NoSuchElementException() {
                 if (testing) {
                     //Unexpected: IndexOutOfBoundsException
@@ -2160,14 +2162,13 @@
         }
 
         public static class ReadOnlySet extends SecurityTest.ReadOnlySetTest {
-            private final Subject subject = new Subject();
+            private Subject subject = new Subject();
 
             public ReadOnlySet() {
                 set = subject.getPrivateCredentials();
                 element = principal;
             }
 
-            @Override
             public void setReadOnly() {
                 subject.setReadOnly();
             }
@@ -2180,7 +2181,6 @@
                 element = principal;
             }
 
-            @Override
             public void setSecure() {
                 denyPermission(new AuthPermission("modifyPrivateCredentials"));
             }
@@ -2235,14 +2235,13 @@
         public static class IteratorReadOnly extends
                 SecurityTest.ReadOnlyIteratorTest {
 
-            private final Subject subject = new Subject();
+            private Subject subject = new Subject();
 
             public IteratorReadOnly() {
                 set = subject.getPublicCredentials();
                 element = principal;
             }
 
-            @Override
             public void setReadOnly() {
                 subject.setReadOnly();
             }
@@ -2256,7 +2255,6 @@
                 element = principal;
             }
 
-            @Override
             public void setSecure() {
                 denyPermission(new AuthPermission("modifyPublicCredentials"));
             }
@@ -2279,14 +2277,13 @@
         }
 
         public static class ReadOnlySet extends SecurityTest.ReadOnlySetTest {
-            private final Subject subject = new Subject();
+            private Subject subject = new Subject();
 
             public ReadOnlySet() {
                 set = subject.getPublicCredentials();
                 element = principal;
             }
 
-            @Override
             public void setReadOnly() {
                 subject.setReadOnly();
             }
@@ -2299,7 +2296,6 @@
                 element = principal;
             }
 
-            @Override
             public void setSecure() {
                 denyPermission(new AuthPermission("modifyPublicCredentials"));
             }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/callback/ConfirmationCallbackTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/callback/ConfirmationCallbackTest.java?view=diff&rev=451857&r1=451856&r2=451857
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/callback/ConfirmationCallbackTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/callback/ConfirmationCallbackTest.java Sun Oct  1 19:52:40 2006
@@ -55,8 +55,8 @@
      */
     public final void testConfirmationCallback_01() throws IllegalArgumentException {
         try {
-            for (int element : mt) {
-                cc = new ConfirmationCallback(element, ot[1], dopt[1]);
+            for (int i = 0; i < mt.length; i++) {
+                cc = new ConfirmationCallback(mt[i], ot[1], dopt[1]);
             }
         } catch (IllegalArgumentException e){}
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/callback/TextOutputCallbackTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/callback/TextOutputCallbackTest.java?view=diff&rev=451857&r1=451856&r2=451857
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/callback/TextOutputCallbackTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/callback/TextOutputCallbackTest.java Sun Oct  1 19:52:40 2006
@@ -51,8 +51,8 @@
     public final void testTextOutputCallback_02() {
         int[] m = { TextOutputCallback.INFORMATION, TextOutputCallback.WARNING,
                 TextOutputCallback.ERROR };
-        for (int element : m) {
-            text = new TextOutputCallback(element, "message");
+        for (int i = 0; i < m.length; i++) {
+            text = new TextOutputCallback(m[i], "message");
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/kerberos/DelegationPermissionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/kerberos/DelegationPermissionTest.java?view=diff&rev=451857&r1=451856&r2=451857
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/kerberos/DelegationPermissionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/kerberos/DelegationPermissionTest.java Sun Oct  1 19:52:40 2006
@@ -15,6 +15,11 @@
  *  limitations under the License.
  */
 
+/**
+* @author Maxim V. Makarov
+* @version $Revision$
+*/
+
 package javax.security.auth.kerberos;
 
 import java.security.AllPermission;
@@ -35,6 +40,10 @@
  */
 public class DelegationPermissionTest extends TestCase {
 
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(DelegationPermissionTest.class);
+    }
+
     /**
      * testing of a correct ctor
      */
@@ -111,7 +120,6 @@
     } 
     
     // testing of the equals method
-    @SuppressWarnings("serial")
     public void testEquals() {
         DelegationPermission dp1 = new DelegationPermission("\"AAA\" \"BBB\"");
         DelegationPermission dp2 = new DelegationPermission("\"AAA\" \"BBB\"");
@@ -191,7 +199,7 @@
 		} catch (NoSuchElementException e) {
 		}
 
-        Enumeration<?> en = pc.elements();
+        Enumeration en = pc.elements();
         assertNotNull(en);
         assertFalse(en.hasMoreElements());
         
@@ -206,7 +214,7 @@
         assertFalse(en.hasMoreElements());
         pc.add(sp2);
         en = pc.elements();
-        Collection<Object> c = new ArrayList<Object>();
+        Collection c = new ArrayList();
         while (en.hasMoreElements())
         {
             c.add(en.nextElement());

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/kerberos/KerberosKeyTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/kerberos/KerberosKeyTest.java?view=diff&rev=451857&r1=451856&r2=451857
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/kerberos/KerberosKeyTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/kerberos/KerberosKeyTest.java Sun Oct  1 19:52:40 2006
@@ -143,15 +143,15 @@
         // TODO add "pianist@EXAMPLE.COM" and "Juri ... @ATHENA.MIT.EDU"
         };
 
-        for (Object[] element : testcases) {
+        for (int i = 0; i < testcases.length; i++) {
             KerberosPrincipal kp = new KerberosPrincipal(
-                    (String) element[0], 1);
+                    (String) testcases[i][0], 1);
 
-            key = new KerberosKey(kp, ((String) element[1]).toCharArray(),
+            key = new KerberosKey(kp, ((String) testcases[i][1]).toCharArray(),
                     "DES");
 
-            assertTrue("Testcase: " + (String) element[0], Arrays.equals(
-                    (byte[]) element[2], key.getEncoded()));
+            assertTrue("Testcase: " + (String) testcases[i][0], Arrays.equals(
+                    (byte[]) testcases[i][2], key.getEncoded()));
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/kerberos/ServicePermissionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/kerberos/ServicePermissionTest.java?view=diff&rev=451857&r1=451856&r2=451857
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/kerberos/ServicePermissionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/kerberos/ServicePermissionTest.java Sun Oct  1 19:52:40 2006
@@ -15,6 +15,11 @@
  *  limitations under the License.
  */
 
+/**
+* @author Maxim V. Makarov
+* @version $Revision$
+*/
+
 package javax.security.auth.kerberos;
 
 import java.security.AllPermission;
@@ -27,11 +32,17 @@
 
 import junit.framework.TestCase;
 
+
+
 /** 
  * Tests ServicePermission class implementation.
  */
 public class ServicePermissionTest extends TestCase {
-
+    
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(ServicePermissionTest.class);
+    }
+    
     /**
      * @tests javax.security.auth.kerberos.ServicePermission#ServicePermission(
      *        java.lang.String,java.lang.String)
@@ -224,7 +235,7 @@
 		} catch (NoSuchElementException e) {
 		}
 
-        Enumeration<?> en = pc.elements();
+        Enumeration en = pc.elements();
         assertNotNull(en);
         assertFalse(en.hasMoreElements());
         
@@ -240,7 +251,7 @@
         pc.add(sp2);
         pc.add(sp3);
         en = pc.elements();
-        Collection<Object> c = new ArrayList<Object>();
+        Collection c = new ArrayList();
         while (en.hasMoreElements())
         {
             c.add(en.nextElement());
@@ -272,8 +283,8 @@
                 "Accept, initiatE" //  first & last upper case
         };
 
-        for (String element : validActions) {
-            new ServicePermission("*", element);
+        for (int i = 0; i < validActions.length; i++) {
+            new ServicePermission("*", validActions[i]);
         }
 
         String[] invalidActions = new String[] { "accept initiate", // space
@@ -284,11 +295,11 @@
                 "accept,", // ','
                 " ,accept" // ','
         };
-        for (String element : invalidActions) {
+        for (int i = 0; i < invalidActions.length; i++) {
             try {
-                new ServicePermission("*", element);
+                new ServicePermission("*", invalidActions[i]);
                 fail("No expected IllegalArgumentException for action: "
-                        + element);
+                        + invalidActions[i]);
             } catch (IllegalArgumentException e) {
             }
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/AppConfigurationEntryTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/AppConfigurationEntryTest.java?view=diff&rev=451857&r1=451856&r2=451857
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/AppConfigurationEntryTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/AppConfigurationEntryTest.java Sun Oct  1 19:52:40 2006
@@ -15,6 +15,11 @@
  *  limitations under the License.
  */
 
+/**
+* @author Maxim V. Makarov
+* @version $Revision$
+*/
+
 package javax.security.auth.login;
 
 import java.util.HashMap;
@@ -25,17 +30,21 @@
 /**
  * Tests AppConfigurationEntry class
  */
+
 public class AppConfigurationEntryTest extends TestCase {
 
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(AppConfigurationEntryTest.class);
+    }
+
     String loginModule = "LoginModule";
 
     private static final String msg = "LoginModuleControlFlag: ";
 
     AppConfigurationEntry entry = null;
 
-    Map<String, Object> options = new HashMap<String, Object>();
+    Map options = new HashMap();
 
-    @Override
     public void setUp() {
         options.put("debug", "true");
         options.put("testing", "false");
@@ -97,12 +106,12 @@
      * test for array of the AppConfigurationEntry and for the method getOptions 
      */
     public void testArrayCtor() {
-        Map<String, Object> options1 = new HashMap<String, Object>();
+        Map options1 = new HashMap();
         options1.put("debug", "false");
         AppConfigurationEntry[] entries = {
                 new AppConfigurationEntry("LoginModule1",AppConfigurationEntry.LoginModuleControlFlag.REQUIRED,options),
                 new AppConfigurationEntry("LoginModule2", AppConfigurationEntry.LoginModuleControlFlag.REQUIRED,options1),
-                new AppConfigurationEntry("LoginModule3",AppConfigurationEntry.LoginModuleControlFlag.OPTIONAL,new HashMap<String, Object>()) };
+                new AppConfigurationEntry("LoginModule3",AppConfigurationEntry.LoginModuleControlFlag.OPTIONAL,new HashMap()) };
 
         assertEquals("LoginModule1", entries[0].getLoginModuleName());
         assertEquals(options, entries[0].getOptions());
@@ -137,12 +146,11 @@
                 AppConfigurationEntry.LoginModuleControlFlag.SUFFICIENT.toString());
     }
     
-    @SuppressWarnings("unchecked")
     public void testImmutability(){
         AppConfigurationEntry entry = new AppConfigurationEntry("LoginModule",
                 AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options);
 
-        Map<String, Object> eOptions = (Map<String, Object>)entry.getOptions();
+        Map eOptions = entry.getOptions();
 
         try {
             eOptions.put("a", "b");

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/ConfigurationTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/ConfigurationTest.java?view=diff&rev=451857&r1=451856&r2=451857
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/ConfigurationTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/ConfigurationTest.java Sun Oct  1 19:52:40 2006
@@ -54,8 +54,7 @@
 			enableAccess = enable;
 		}
 
-		@Override
-        public void checkPermission(Permission p) {
+		public void checkPermission(Permission p) {
 			if (p instanceof AuthPermission && checkTarget.equals(p)) {
 				checkAsserted = true;
 				if (!enableAccess) {
@@ -76,14 +75,12 @@
 	 */
 	public static class ConfTestProvider extends Configuration {
 
-		@Override
-        public AppConfigurationEntry[] getAppConfigurationEntry(
+		public AppConfigurationEntry[] getAppConfigurationEntry(
 				String applicationName) {
 			return null;
 		}
 
-		@Override
-        public void refresh() {
+		public void refresh() {
 		}
 	}
 
@@ -95,8 +92,7 @@
 
 	Configuration oldConfiguration = Configuration.getConfiguration();
 
-	@Override
-    public void tearDown() {
+	public void tearDown() {
 		System.setSecurityManager(old);
 		Configuration.setConfiguration(oldConfiguration);
 	}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/LoginContextTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/LoginContextTest.java?view=diff&rev=451857&r1=451856&r2=451857
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/LoginContextTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/login/LoginContextTest.java Sun Oct  1 19:52:40 2006
@@ -15,6 +15,11 @@
  *  limitations under the License.
  */
 
+/**
+* @author Stepan M. Mishura
+* @version $Revision$
+*/
+
 package javax.security.auth.login;
 
 import java.security.Security;
@@ -42,11 +47,10 @@
 
     private static final String moduleName = "moduleName";
 
-    private final Subject subject = new Subject();
+    private Subject subject = new Subject();
 
-    private final MyCallbackHandler handler = new MyCallbackHandler();
+    private MyCallbackHandler handler = new MyCallbackHandler();
 
-    @Override
     protected void setUp() throws Exception {
         super.setUp();
 
@@ -193,7 +197,7 @@
      */
     public final void testLC_String_LoginModuleInitialize() throws Exception {
 
-        Hashtable<String, ?> options = new Hashtable<String, Object>();
+        Hashtable options = new Hashtable();
 
         // add required module to the current configuration
         MyConfig.addRequired("MyLoginModule", options);
@@ -208,7 +212,7 @@
         // only one module must be created
         assertEquals("Number of modules", 1, MyLoginModule.list.size());
 
-        MyLoginModule module = MyLoginModule.list.get(0);
+        MyLoginModule module = (MyLoginModule) MyLoginModule.list.get(0);
 
         // login context instantiates subject object itself. 
         assertNotNull("Subject", module.subject);
@@ -353,7 +357,7 @@
     public final void testLC_StringCallbackHandler_LoginModuleInitialize()
             throws Exception {
 
-        Hashtable<String, ?> options = new Hashtable<String, Object>();
+        Hashtable options = new Hashtable();
 
         // add required module to the current configuration
         MyConfig.addRequired("MyLoginModule", options);
@@ -368,7 +372,7 @@
         // only one module must be created
         assertEquals("Number of modules", 1, MyLoginModule.list.size());
 
-        MyLoginModule module = MyLoginModule.list.get(0);
+        MyLoginModule module = (MyLoginModule) MyLoginModule.list.get(0);
 
         // login context instantiates subject object itself. 
         assertNotNull("Subject", module.subject);
@@ -516,7 +520,7 @@
     public final void testLC_StringSubject_LoginModuleInitialize()
             throws Exception {
 
-        Hashtable<String, ?> options = new Hashtable<String, Object>();
+        Hashtable options = new Hashtable();
 
         // add required module to the current configuration
         MyConfig.addRequired("MyLoginModule", options);
@@ -531,7 +535,7 @@
         // only one module must be created
         assertEquals("Number of modules", 1, MyLoginModule.list.size());
 
-        MyLoginModule module = MyLoginModule.list.get(0);
+        MyLoginModule module = (MyLoginModule) MyLoginModule.list.get(0);
 
         // login context has provided subject 
         assertTrue("Subject", module.subject == subject);
@@ -662,7 +666,7 @@
     public final void testLC_StringSubjectCallbackHandler_LoginModuleInitialize()
             throws Exception {
 
-        Hashtable<String, ?> options = new Hashtable<String, Object>();
+        Hashtable options = new Hashtable();
 
         // add required module to the current configuration
         MyConfig.addRequired("MyLoginModule", options);
@@ -677,7 +681,7 @@
         // only one module must be created
         assertEquals("Number of modules", 1, MyLoginModule.list.size());
 
-        MyLoginModule module = MyLoginModule.list.get(0);
+        MyLoginModule module = (MyLoginModule) MyLoginModule.list.get(0);
 
         // login context has provided subject 
         assertTrue("Subject", module.subject == subject);
@@ -745,13 +749,12 @@
 
         private String appName;
 
-        private ArrayList<AppConfigurationEntry> entries;
+        private ArrayList entries;
 
         public MyConfig() {
-            entries = new ArrayList<AppConfigurationEntry>();
+            entries = new ArrayList();
         }
 
-        @Override
         public AppConfigurationEntry[] getAppConfigurationEntry(
                 String applicationName) {
 
@@ -760,18 +763,18 @@
             if (entries != null) {
                 if (entries.size() == 0) {
                     return new AppConfigurationEntry[0];
-                }
-                AppConfigurationEntry[] appEntries = new AppConfigurationEntry[entries
-                        .size()];
+                } else {
+                    AppConfigurationEntry[] appEntries = new AppConfigurationEntry[entries
+                            .size()];
 
-                entries.toArray(appEntries);
+                    entries.toArray(appEntries);
 
-                return appEntries;
+                    return appEntries;
+                }
             }
             return null;
         }
 
-        @Override
         public void refresh() {
         }
 
@@ -798,8 +801,8 @@
         /**
          * Appends required login module to the current configuration
          */
-        public static void addRequired(String name, Map<String, ?> options) {
-            ArrayList<AppConfigurationEntry> list = ((MyConfig) Configuration.getConfiguration()).entries;
+        public static void addRequired(String name, Map options) {
+            ArrayList list = ((MyConfig) Configuration.getConfiguration()).entries;
 
             AppConfigurationEntry entry = new AppConfigurationEntry(
                     "javax.security.auth.login.LoginContextTest$" + name,
@@ -824,10 +827,10 @@
 
     public static class MyLoginModule implements LoginModule {
 
-        public static ArrayList<MyLoginModule> list = new ArrayList<MyLoginModule>();
+        public static ArrayList list = new ArrayList();
 
         public static void reset() {
-            list = new ArrayList<MyLoginModule>();
+            list = new ArrayList();
         }
 
         public boolean aborted;
@@ -844,9 +847,9 @@
 
         public CallbackHandler handler;
 
-        public Map<?, ?> sharedState;
+        public Map sharedState;
 
-        public Map<?, ?> options;
+        public Map options;
 
         public MyLoginModule() {
             list.add(this);
@@ -873,7 +876,7 @@
         }
 
         public void initialize(Subject subject, CallbackHandler handler,
-                Map<String, ?> sharedState, Map<String, ?> options) {
+                Map sharedState, Map options) {
 
             if (logined || commited || aborted) {
                 throw new AssertionError("MUST be initialized first");
@@ -916,8 +919,8 @@
             return false;
         }
 
-        public void initialize(Subject arg0, CallbackHandler arg1, Map<String, ?> arg2,
-                Map<String, ?> arg3) {
+        public void initialize(Subject arg0, CallbackHandler arg1, Map arg2,
+                Map arg3) {
         }
 
         public boolean login() throws LoginException {

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?view=diff&rev=451857&r1=451856&r2=451857
==============================================================================
--- 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 Sun Oct  1 19:52:40 2006
@@ -15,13 +15,17 @@
  *  limitations under the License.
  */
 
+/**
+* @author Alexander V. Astapchuk
+* @version $Revision$
+*/
+
 package javax.security.auth.login;
 
 import java.io.IOException;
 import java.net.URL;
 import java.security.AccessControlContext;
 import java.security.AccessController;
-import java.security.BasicPermission;
 import java.security.CodeSource;
 import java.security.DomainCombiner;
 import java.security.Permission;
@@ -63,6 +67,10 @@
 
     private static final int SUFFICIENT = 3;
 
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(LoginContextTest_1.class);
+    }
+
     /**
      * Converts short (local) class names (like TestLoginModule) into the 
      * global (fully qualified) ones.<br>
@@ -114,13 +122,13 @@
     private static final class TestConfig extends Configuration {
         private String name;
 
-        private final ArrayList<AppConfigurationEntry> entries = new ArrayList<AppConfigurationEntry>();
+        private ArrayList entries = new ArrayList();
 
         // A map 'name'=>'some specific configuration'
-        private final HashMap<String, Configuration> configs = new HashMap<String, Configuration>();
+        private HashMap configs = new HashMap();
 
         // An array which keeps track of the configuration names requested.
-        private final ArrayList<String> requests = new ArrayList<String>();
+        private ArrayList requests = new ArrayList();
 
         public TestConfig() {
         }
@@ -129,7 +137,6 @@
             this.name = name;
         }
 
-        @Override
         public AppConfigurationEntry[] getAppConfigurationEntry(String appName) {
 
             if (!requests.contains(appName)) {
@@ -138,7 +145,7 @@
 
             if (name == null || !name.equals(appName)) {
 
-                Configuration conf = configs.get(appName);
+                Configuration conf = (Configuration) configs.get(appName);
                 if (conf != null) {
                     return conf.getAppConfigurationEntry(appName);
                 }
@@ -154,7 +161,6 @@
             return ret;
         }
 
-        @Override
         public void refresh() {
             // do nothing
         }
@@ -166,31 +172,31 @@
         String addRequired(String name) {
             return add(name,
                     AppConfigurationEntry.LoginModuleControlFlag.REQUIRED,
-                    new HashMap<String, Object>());
+                    new HashMap());
         }
 
         String addOptional(String name) {
             return add(name,
                     AppConfigurationEntry.LoginModuleControlFlag.OPTIONAL,
-                    new HashMap<String, Object>());
+                    new HashMap());
         }
 
         String addSufficient(String name) {
             return add(name,
                     AppConfigurationEntry.LoginModuleControlFlag.SUFFICIENT,
-                    new HashMap<String, Object>());
+                    new HashMap());
         }
 
         String addRequisite(String name) {
-            return add(name, LoginModuleControlFlag.REQUISITE, new HashMap<String, Object>());
+            return add(name, LoginModuleControlFlag.REQUISITE, new HashMap());
         }
 
-        String add(int type, String name, Map<String, ?> options) {
+        String add(int type, String name, Map options) {
             return add(name, mapControlFlag(type), options);
         }
 
         String add(String name,
-                AppConfigurationEntry.LoginModuleControlFlag flag, Map<String, ?> options) {
+                AppConfigurationEntry.LoginModuleControlFlag flag, Map options) {
             String fullName = getGlobalClassName(name);
             AppConfigurationEntry entry = new AppConfigurationEntry(fullName,
                     flag, options);
@@ -220,7 +226,7 @@
 
         public static String addInstalled(int type, String name) {
             return ((TestConfig) Configuration.getConfiguration()).add(type,
-                    name, new HashMap<String, Object>());
+                    name, new HashMap());
         }
 
         public static void clear() {
@@ -308,7 +314,7 @@
         public static LoginException staticLE;
 
         //
-        protected static ArrayList<TestLoginModule> instances = new ArrayList<TestLoginModule>();
+        protected static ArrayList instances = new ArrayList();
 
         private boolean initCalled;
 
@@ -335,7 +341,7 @@
          * returns <code>i</code> item from the list of tracked items.
          */
         static TestLoginModule get(int i) {
-            return instances.get(i);
+            return (TestLoginModule) instances.get(i);
         }
 
         /**
@@ -458,7 +464,7 @@
          * See javax.security.auth.spi.LoginModule.initialize()
          */
         public void initialize(Subject subject,
-                CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {
+                CallbackHandler callbackHandler, Map sharedState, Map options) {
 
             this.cbHandler = callbackHandler;
             initCalled = true;
@@ -597,7 +603,7 @@
      * created.<br>
      */
     public static class TestCallbackHandler implements CallbackHandler {
-        protected static ArrayList<TestCallbackHandler> instances = new ArrayList<TestCallbackHandler>();
+        protected static ArrayList instances = new ArrayList();
 
         /**
          * Returns number of the instances tracked.
@@ -629,7 +635,6 @@
         }
     }
 
-    @Override
     protected void setUp() throws Exception {
         super.setUp();
         Configuration.setConfiguration(new TestConfig());
@@ -808,12 +813,11 @@
      * Make sure that the proper (context) class loader is used.
      */
     public void testLogin_minus1() throws Exception {
-        final ArrayList<String> requests = new ArrayList<String>();
+        final ArrayList requests = new ArrayList();
         ClassLoader saveCCL = Thread.currentThread().getContextClassLoader();
 
         ClassLoader testClassLoader = new ClassLoader() {
-            @Override
-            protected synchronized Class<?> loadClass(String klassName,
+            protected synchronized Class loadClass(String klassName,
                     boolean resolve) throws ClassNotFoundException {
                 requests.add(klassName);
                 return super.loadClass(klassName, resolve);
@@ -1823,7 +1827,7 @@
         final DomainCombiner dc = new SubjectDomainCombiner(dummySubj);
         AccessControlContext acc = new AccessControlContext(AccessController
                 .getContext(), dc);
-        PrivilegedExceptionAction<?> action = new PrivilegedExceptionAction<Object>() {
+        PrivilegedExceptionAction action = new PrivilegedExceptionAction() {
             public Object run() throws Exception {
                 implTestContextUsage(true, dc);
                 return null;
@@ -1845,7 +1849,7 @@
         final DomainCombiner dc = new SubjectDomainCombiner(dummySubj);
         AccessControlContext acc = new AccessControlContext(AccessController
                 .getContext(), dc);
-        PrivilegedExceptionAction<?> action = new PrivilegedExceptionAction<Object>() {
+        PrivilegedExceptionAction action = new PrivilegedExceptionAction() {
             public Object run() throws Exception {
                 implTestContextUsage(false, dc);
                 return null;
@@ -1896,7 +1900,6 @@
             accCtor = AccessController.getContext();
         }
 
-        @Override
         public void handle(Callback[] cbs) {
             accHandle = AccessController.getContext();
         }
@@ -1955,14 +1958,12 @@
             accCtor = AccessController.getContext();
         }
 
-        @Override
         public void initialize(Subject subject,
-                CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {
+                CallbackHandler callbackHandler, Map sharedState, Map options) {
             accInit = AccessController.getContext();
             super.initialize(subject, callbackHandler, sharedState, options);
         }
 
-        @Override
         public boolean login() throws LoginException {
             accLogin = AccessController.getContext();
             if (cbHandler != null) {
@@ -1977,19 +1978,16 @@
             return super.login();
         }
 
-        @Override
         public boolean commit() throws LoginException {
             accCommit = AccessController.getContext();
             return super.commit();
         }
 
-        @Override
         public boolean logout() throws LoginException {
             accLogout = AccessController.getContext();
             return super.logout();
         }
 
-        @Override
         public boolean abort() throws LoginException {
             accAbort = AccessController.getContext();
             return super.abort();
@@ -2101,9 +2099,9 @@
      * @return <code>true</code> is the name is in the list, 
      * <code>false</code> otherwise. 
      */
-    private static boolean lookupAuthPermission(ArrayList<Permission> al, String name) {
+    private static boolean lookupAuthPermission(ArrayList al, String name) {
         for (int i = 0; i < al.size(); i++) {
-            Permission p = al.get(i);
+            Permission p = (Permission) al.get(i);
             if (p instanceof AuthPermission && name.equals(p.getName())) {
                 return true;
             }
@@ -2117,20 +2115,19 @@
     public void testSecurityManagerUsage() throws Exception {
         // 1. create a special-purpose SecurityManager which keeps track 
         // of Permissions checked
-        final ArrayList<Permission> requests = new ArrayList<Permission>();
+        final ArrayList requests = new ArrayList();
         // a list of permissions allowed - just to make sure I'll be able to 
         // set security manager back.
-        final ArrayList<BasicPermission> allowedPerms = new ArrayList<BasicPermission>();
+        final ArrayList allowedPerms = new ArrayList();
         //
         allowedPerms.add(new RuntimePermission("setIO"));
         allowedPerms.add(new RuntimePermission("setSecurityManager"));
         //
         SecurityManager sm = new SecurityManager() {
-            @Override
             public void checkPermission(Permission p) {
                 requests.add(p);
                 for (int i = 0; i < allowedPerms.size(); i++) {
-                    Permission good = allowedPerms.get(i);
+                    Permission good = (Permission) allowedPerms.get(i);
                     if (good.equals(p)) {
                         return;
                     }
@@ -2153,7 +2150,7 @@
         try {
             System.setSecurityManager(sm);
 
-            AccessController.doPrivileged(new PrivilegedAction<Object>() {
+            AccessController.doPrivileged(new PrivilegedAction() {
                 public Object run() {
                     implTestSecurityManagerUsage(requests, allowedPerms);
                     return null;
@@ -2174,8 +2171,8 @@
      * @param requests
      * @param allowedPerms
      */
-    private void implTestSecurityManagerUsage(ArrayList<Permission> requests,
-            ArrayList<BasicPermission> allowedPerms) {
+    private void implTestSecurityManagerUsage(ArrayList requests,
+            ArrayList allowedPerms) {
         String configPermName = "createLoginContext." + CONFIG_NAME;
         String otherPermName = "createLoginContext.other";
         String dummyName = "no such name";

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/x500/X500PrincipalTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/x500/X500PrincipalTest.java?view=diff&rev=451857&r1=451856&r2=451857
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/x500/X500PrincipalTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/x500/X500PrincipalTest.java Sun Oct  1 19:52:40 2006
@@ -30,7 +30,9 @@
 import java.util.Arrays;
 import java.util.Locale;
 
+import junit.framework.Test;
 import junit.framework.TestCase;
+import junit.framework.TestSuite;
 
 /**
  * Tests X500Principal class
@@ -1939,6 +1941,14 @@
         assertEquals("cn=a\nb", s);
     }
 
+    public static Test suite() {
+        return new TestSuite(X500PrincipalTest.class);
+    }
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(suite());
+    }
+
     public static final String[] RFC2253_SPECIAL = new String[] { ",", "=",
             "+", "<", ">", "#", ";" };
 
@@ -2053,15 +2063,15 @@
         list.add("CN=,ST=", "CN=,ST=", "CN=, ST="); // empty value for both RDNs
         list.add("CN=;ST=B", "CN=,ST=B", "CN=, ST=B"); // empty value for 1 RDN
         list.add("CN=;ST=", "CN=,ST=", "CN=, ST="); // empty value for both RDNs
-        for (String element : RFC2253_SPECIAL) {
+        for (int i = 0; i < RFC2253_SPECIAL.length; i++) {
             // \special
-            list.add("CN=\\" + element,
-                    "CN=\\" + element, "CN=\"" + element
+            list.add("CN=\\" + RFC2253_SPECIAL[i],
+                    "CN=\\" + RFC2253_SPECIAL[i], "CN=\"" + RFC2253_SPECIAL[i]
                             + "\"");
 
             // A + \special + B
-            list.add("CN=A\\" + element + "B", "CN=A\\"
-                    + element + "B", "CN=\"A" + element
+            list.add("CN=A\\" + RFC2253_SPECIAL[i] + "B", "CN=A\\"
+                    + RFC2253_SPECIAL[i] + "B", "CN=\"A" + RFC2253_SPECIAL[i]
                     + "B\"");
         }
 
@@ -2171,24 +2181,24 @@
         //
         list.add("CN=\"\"", "CN=", "CN="); // empty quoted string
         list.add("CN=\"A\"", "CN=A", "CN=A"); // "A"
-        for (String element : RFC2253_SPECIAL) {
+        for (int i = 0; i < RFC2253_SPECIAL.length; i++) {
             // "special" => \special
-            list.add("CN=\"" + element + "\"", "CN=\\"
-                    + element, "CN=\"" + element + "\"");
+            list.add("CN=\"" + RFC2253_SPECIAL[i] + "\"", "CN=\\"
+                    + RFC2253_SPECIAL[i], "CN=\"" + RFC2253_SPECIAL[i] + "\"");
 
             // "A + special + B" => A + \special + B
-            list.add("CN=\"A" + element + "B\"", "CN=A\\"
-                    + element + "B", "CN=\"A" + element
+            list.add("CN=\"A" + RFC2253_SPECIAL[i] + "B\"", "CN=A\\"
+                    + RFC2253_SPECIAL[i] + "B", "CN=\"A" + RFC2253_SPECIAL[i]
                     + "B\"");
         }
-        for (String element : RFC2253_SPECIAL) {
+        for (int i = 0; i < RFC2253_SPECIAL.length; i++) {
             // "\special" => \special
-            list.add("CN=\"\\" + element + "\"", "CN=\\"
-                    + element, "CN=\"" + element + "\"");
+            list.add("CN=\"\\" + RFC2253_SPECIAL[i] + "\"", "CN=\\"
+                    + RFC2253_SPECIAL[i], "CN=\"" + RFC2253_SPECIAL[i] + "\"");
 
             // "A + \special + B" => A + \special + B
-            list.add("CN=\"A\\" + element + "B\"", "CN=A\\"
-                    + element + "B", "CN=\"A" + element
+            list.add("CN=\"A\\" + RFC2253_SPECIAL[i] + "B\"", "CN=A\\"
+                    + RFC2253_SPECIAL[i] + "B", "CN=\"A" + RFC2253_SPECIAL[i]
                     + "B\"");
         }
         list.add("CN=\"\\\"\"", "CN=\\\"", "CN=\"\\\"\"", null, (byte) 0x02); // "\""
@@ -2233,14 +2243,14 @@
         list.add("CN=\\  A  ", "CN=\\  A", "CN=\"  A\"", "cn=a", null,
                 (byte) 0x01); // escaped leading space
         list.add("CN=  A \\ ", "CN=A \\ ", "CN=\"A  \"", "cn=a", null,
-                (byte) 0x01); // escaped trailing space
+                (byte) 0x01); // escaped traling space
 
-        list.add("CN=  \"A\"  ", "CN=A", "CN=A", "cn=a"); // leading & trailing spaces
+        list.add("CN=  \"A\"  ", "CN=A", "CN=A", "cn=a"); // leading & traling spaces
 
         StringBuffer errorMsg = new StringBuffer();
         for (int i = 0; i < list.size(); i++) {
 
-            Object[] obj = list.get(i);
+            Object[] obj = (Object[]) list.get(i);
 
             String dn = (String) obj[0];
             String rfc2253 = (String) obj[1];
@@ -2296,9 +2306,9 @@
 
                             System.out.println("\nI " + i);
                             byte[] enc = p.getEncoded();
-                            for (byte element : enc) {
+                            for (int j = 0; j < enc.length; j++) {
                                 System.out.print(", 0x"
-                                        + Integer.toHexString(element));
+                                        + Integer.toHexString(enc[j]));
                             }
                         }
                     }
@@ -2386,11 +2396,11 @@
         };
 
         StringBuffer errorMsg = new StringBuffer();
-        for (String element : illegalDN) {
+        for (int i = 0; i < illegalDN.length; i++) {
 
             try {
-                new X500Principal(element);
-                errorMsg.append("No IllegalArgumentException: '" + element
+                new X500Principal(illegalDN[i]);
+                errorMsg.append("No IllegalArgumentException: '" + illegalDN[i]
                         + "'\n");
             } catch (IllegalArgumentException e) {
             }
@@ -2670,7 +2680,7 @@
         StringBuffer errorMsg = new StringBuffer();
         for (int i = 0; i < list.size(); i++) {
 
-            Object[] values = list.get(i);
+            Object[] values = (Object[]) list.get(i);
             byte[] encoded = (byte[]) values[0];
             String rfc2253 = (String) values[1];
             String rfc1179 = (String) values[2];
@@ -2725,8 +2735,7 @@
         }
     }
 
-    @SuppressWarnings("serial")
-    public static class TestList extends ArrayList<Object[]> {
+    public static class TestList extends ArrayList {
         //
         // TODO comment me
         //
@@ -2767,7 +2776,7 @@
         // TODO comment me
         //
 
-        private static final byte[] emptyMask = new byte[] { 0x00 };
+        private static byte[] emptyMask = new byte[] { 0x00 };
 
         public void add(byte[] encoding, String rfc2253, String rfc1779,
                 String canonical) {



Mime
View raw message