harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r464764 [1/2] - in /incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java: common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/ common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/ser...
Date Tue, 17 Oct 2006 01:12:06 GMT
Author: ndbeyer
Date: Mon Oct 16 18:12:03 2006
New Revision: 464764

URL: http://svn.apache.org/viewvc?view=rev&rev=464764
Log:
auth test code cleanup
* add missing annotations
* add generifications, were possible
* other various trivial items

Modified:
    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/AppConfigurationEntryTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/ConfigurationTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/LoginContext1Test.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/LoginContext2Test.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/Sasl1Test.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/sasl/Sasl2Test.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/sasl/Sasl3Test.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/sasl/Sasl4Test.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/windows/org/apache/harmony/auth/module/NTLoginModuleTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/ChoiceCallbackTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/ChoiceCallbackTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/ChoiceCallbackTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/ChoiceCallbackTest.java Mon Oct 16 18:12:03 2006
@@ -32,15 +32,10 @@
 /**
  * Serialization test for ChoiceCallback class
  */
-
 public class ChoiceCallbackTest extends SerializationTest implements
         SerializationTest.SerializableAssert {
-  
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(ChoiceCallbackTest.class);
-    }
 
+    @Override
     protected Object[] getData() {
 
         String prompt = "prompt";

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/ConfirmationCallbackTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/ConfirmationCallbackTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/ConfirmationCallbackTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/ConfirmationCallbackTest.java Mon Oct 16 18:12:03 2006
@@ -32,14 +32,10 @@
 /**
  * Serialization test for ConfirmationCallback class
  */
-
 public class ConfirmationCallbackTest extends SerializationTest implements
         SerializationTest.SerializableAssert {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(ConfirmationCallbackTest.class);
-    }
-
+    @Override
     protected Object[] getData() {
         return new Object[] { new ConfirmationCallback("prompt",
                 ConfirmationCallback.INFORMATION,

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/LanguageCallbackTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/LanguageCallbackTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/LanguageCallbackTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/LanguageCallbackTest.java Mon Oct 16 18:12:03 2006
@@ -32,14 +32,10 @@
 /**
  * Serialization test for LanguageCallback class
  */
-
 public class LanguageCallbackTest extends SerializationTest implements
         SerializationTest.SerializableAssert {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(LanguageCallbackTest.class);
-    }
-
+    @Override
     protected Object[] getData() {
         LanguageCallback lc = new LanguageCallback();
         lc.setLocale(Locale.UK);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/NameCallbackTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/NameCallbackTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/NameCallbackTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/NameCallbackTest.java Mon Oct 16 18:12:03 2006
@@ -32,14 +32,10 @@
 /**
  * Serialization test for NameCallback class
  */
-
 public class NameCallbackTest extends SerializationTest implements
         SerializationTest.SerializableAssert {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(NameCallbackTest.class);
-    }
-
+    @Override
     protected Object[] getData() {
         NameCallback nc = new NameCallback("prmpt", "defName");
         nc.setName("Name");

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/PasswordCallbackTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/PasswordCallbackTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/PasswordCallbackTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/PasswordCallbackTest.java Mon Oct 16 18:12:03 2006
@@ -32,14 +32,10 @@
 /**
  * Serialization test for PasswordCallback class
  */
-
 public class PasswordCallbackTest extends SerializationTest implements
         SerializationTest.SerializableAssert {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(PasswordCallbackTest.class);
-    }
-
+    @Override
     protected Object[] getData() {
         char[] pwd = {'a', 'b', 'c'};
         PasswordCallback p = new PasswordCallback("prmpt", true);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/TextInputCallbackTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/TextInputCallbackTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/TextInputCallbackTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/TextInputCallbackTest.java Mon Oct 16 18:12:03 2006
@@ -32,14 +32,10 @@
 /**
  * Serialization test for TextInputCallback class
  */
-
 public class TextInputCallbackTest extends SerializationTest implements
         SerializationTest.SerializableAssert {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(TextInputCallbackTest.class);
-    }
-
+    @Override
     protected Object[] getData() {
         TextInputCallback t = new TextInputCallback("prmpt","defText");
         t.setText("new text");

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/TextOutputCallbackTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/TextOutputCallbackTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/TextOutputCallbackTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/TextOutputCallbackTest.java Mon Oct 16 18:12:03 2006
@@ -36,10 +36,7 @@
 public class TextOutputCallbackTest extends SerializationTest implements
         SerializationTest.SerializableAssert {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(TextOutputCallbackTest.class);
-    }
-
+    @Override
     protected Object[] getData() {
         return new Object[] { new TextOutputCallback(
                 TextOutputCallback.INFORMATION, "message") };

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/UnsupportedCallbackExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/UnsupportedCallbackExceptionTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/UnsupportedCallbackExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/serialization/UnsupportedCallbackExceptionTest.java Mon Oct 16 18:12:03 2006
@@ -31,15 +31,11 @@
 /**
  * Serialization test for UnsupportedCallbackException class
  */
-
 public class UnsupportedCallbackExceptionTest extends SerializationTest {
 
     static LanguageCallback nc = new LanguageCallback();
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(UnsupportedCallbackExceptionTest.class);
-    }
-
+    @Override
     protected Object[] getData() {
         return new Object[] {new UnsupportedCallbackException(nc)};
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/DelegationPermissionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/DelegationPermissionTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/DelegationPermissionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/DelegationPermissionTest.java Mon Oct 16 18:12:03 2006
@@ -33,6 +33,7 @@
  */
 public class DelegationPermissionTest extends SerializationTest {
 
+    @Override
     protected Object[] getData() {
         return new Object[] {
                 new DelegationPermission("\"AAA\" \"BBB\"", "action"),

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/KrbDelegationPermissionCollectionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/KrbDelegationPermissionCollectionTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/KrbDelegationPermissionCollectionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/KrbDelegationPermissionCollectionTest.java Mon Oct 16 18:12:03 2006
@@ -24,12 +24,7 @@
 
 import java.security.Permission;
 import java.security.PermissionCollection;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashSet;
-
 import javax.security.auth.kerberos.DelegationPermission;
-
 import org.apache.harmony.testframework.serialization.SerializationTest;
 
 
@@ -39,6 +34,7 @@
  */
 public class KrbDelegationPermissionCollectionTest extends SerializationTest {
 
+    @Override
     protected Object[] getData() {
         Permission p1 = new DelegationPermission("\"AAA\" \"BBB\"", "action");
         Permission p2 = new DelegationPermission("\"AAA\" \"CCC\"");

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/KrbServicePermissionCollectionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/KrbServicePermissionCollectionTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/KrbServicePermissionCollectionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/KrbServicePermissionCollectionTest.java Mon Oct 16 18:12:03 2006
@@ -24,12 +24,7 @@
 
 import java.security.Permission;
 import java.security.PermissionCollection;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashSet;
-
 import javax.security.auth.kerberos.ServicePermission;
-
 import org.apache.harmony.testframework.serialization.SerializationTest;
 
 /**
@@ -37,6 +32,7 @@
  */
 public class KrbServicePermissionCollectionTest extends SerializationTest {
 
+    @Override
     protected Object[] getData() {
         Permission p1 = new ServicePermission("AAA", "accept");
         Permission p2 = new ServicePermission("BBB", "initiate");

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/ServicePermissionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/ServicePermissionTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/ServicePermissionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/kerberos/serialization/ServicePermissionTest.java Mon Oct 16 18:12:03 2006
@@ -32,6 +32,7 @@
  */
 public class ServicePermissionTest extends SerializationTest {
 
+    @Override
     protected Object[] getData() {
         return new Object[] { new ServicePermission("AAA", "accept"),
                 new ServicePermission("BBB", "initiate"),

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AppConfigurationEntryTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AppConfigurationEntryTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AppConfigurationEntryTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AppConfigurationEntryTest.java Mon Oct 16 18:12:03 2006
@@ -31,21 +31,17 @@
 /**
  * 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 options = new HashMap();
+    Map<String, Object> options = new HashMap<String, Object>();
 
+    @Override
     public void setUp() {
         options.put("debug", "true");
         options.put("testing", "false");
@@ -116,7 +112,7 @@
      * test for array of the AppConfigurationEntry and for the method getOptions 
      */
     public void testArrayCtor() {
-        Map options1 = new HashMap();
+        Map<String, String> options1 = new HashMap<String, String>();
         options1.put("debug", "false");
         AppConfigurationEntry[] entries = {
                 new AppConfigurationEntry("LoginModule1",
@@ -127,7 +123,7 @@
                         options1),
                 new AppConfigurationEntry("LoginModule3",
                         AppConfigurationEntry.LoginModuleControlFlag.OPTIONAL,
-                        new HashMap()) };
+                        new HashMap<String, String>()) };
 
         assertEquals("LoginModule1", entries[0].getLoginModuleName());
         assertEquals(options, entries[0].getOptions());
@@ -170,11 +166,12 @@
                         .toString());
     }
 
+    @SuppressWarnings("unchecked")
     public void testImmutability() {
         AppConfigurationEntry entry = new AppConfigurationEntry("LoginModule",
                 AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options);
 
-        Map eOptions = entry.getOptions();
+        Map<String, Object> eOptions = (Map<String, Object>)entry.getOptions();
 
         try {
             eOptions.put("a", "b");

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/ConfigurationTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/ConfigurationTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/ConfigurationTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/ConfigurationTest.java Mon Oct 16 18:12:03 2006
@@ -54,12 +54,14 @@
 	 */
 	public static class ConfTestProvider extends Configuration {
 
-		public AppConfigurationEntry[] getAppConfigurationEntry(
+		@Override
+        public AppConfigurationEntry[] getAppConfigurationEntry(
 				String applicationName) {
 			return null;
 		}
 
-		public void refresh() {
+		@Override
+        public void refresh() {
 		}
 	}
 
@@ -222,13 +224,9 @@
             Configuration.setConfiguration(null); // reset default config
             try {
                 Configuration.getConfiguration();
-                TestCase.fail("No expected SecurityException");
+                fail("No expected SecurityException");
             } catch (SecurityException e) {
             }
         }
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(ConfigurationTest.class);
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/LoginContext1Test.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/LoginContext1Test.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/LoginContext1Test.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/LoginContext1Test.java Mon Oct 16 18:12:03 2006
@@ -26,6 +26,7 @@
 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;
@@ -126,13 +127,13 @@
     private static final class TestConfig extends Configuration {
         private String name;
 
-        private ArrayList entries = new ArrayList();
+        private final ArrayList<AppConfigurationEntry> entries = new ArrayList<AppConfigurationEntry>();
 
         // A map 'name'=>'some specific configuration'
-        private HashMap configs = new HashMap();
+        private final HashMap<String, Configuration> configs = new HashMap<String, Configuration>();
 
         // An array which keeps track of the configuration names requested.
-        private ArrayList requests = new ArrayList();
+        private final ArrayList<String> requests = new ArrayList<String>();
 
         public TestConfig() {
         }
@@ -141,6 +142,7 @@
             this.name = name;
         }
 
+        @Override
         public AppConfigurationEntry[] getAppConfigurationEntry(String appName) {
 
             if (!requests.contains(appName)) {
@@ -149,7 +151,7 @@
 
             if (name == null || !name.equals(appName)) {
 
-                Configuration conf = (Configuration) configs.get(appName);
+                Configuration conf = configs.get(appName);
                 if (conf != null) {
                     return conf.getAppConfigurationEntry(appName);
                 }
@@ -165,6 +167,7 @@
             return ret;
         }
 
+        @Override
         public void refresh() {
             // do nothing
         }
@@ -176,31 +179,31 @@
         String addRequired(String name) {
             return add(name,
                     AppConfigurationEntry.LoginModuleControlFlag.REQUIRED,
-                    new HashMap());
+                    new HashMap<String, Object>());
         }
 
         String addOptional(String name) {
             return add(name,
                     AppConfigurationEntry.LoginModuleControlFlag.OPTIONAL,
-                    new HashMap());
+                    new HashMap<String, Object>());
         }
 
         String addSufficient(String name) {
             return add(name,
                     AppConfigurationEntry.LoginModuleControlFlag.SUFFICIENT,
-                    new HashMap());
+                    new HashMap<String, Object>());
         }
 
         String addRequisite(String name) {
-            return add(name, LoginModuleControlFlag.REQUISITE, new HashMap());
+            return add(name, LoginModuleControlFlag.REQUISITE, new HashMap<String, Object>());
         }
 
-        String add(int type, String name, Map options) {
+        String add(int type, String name, Map<String, ?> options) {
             return add(name, mapControlFlag(type), options);
         }
 
         String add(String name,
-                AppConfigurationEntry.LoginModuleControlFlag flag, Map options) {
+                AppConfigurationEntry.LoginModuleControlFlag flag, Map<String, ?> options) {
             String fullName = getGlobalClassName(name);
             AppConfigurationEntry entry = new AppConfigurationEntry(fullName,
                     flag, options);
@@ -230,7 +233,7 @@
 
         public static String addInstalled(int type, String name) {
             return ((TestConfig) Configuration.getConfiguration()).add(type,
-                    name, new HashMap());
+                    name, new HashMap<String, Object>());
         }
 
         public static void clear() {
@@ -318,7 +321,7 @@
         public static LoginException staticLE;
 
         //
-        protected static ArrayList instances = new ArrayList();
+        protected static ArrayList<TestLoginModule> instances = new ArrayList<TestLoginModule>();
 
         private boolean initCalled;
 
@@ -345,7 +348,7 @@
          * returns <code>i</code> item from the list of tracked items.
          */
         static TestLoginModule get(int i) {
-            return (TestLoginModule) instances.get(i);
+            return instances.get(i);
         }
 
         /**
@@ -464,11 +467,8 @@
             return true;
         }
 
-        /**
-         * See javax.security.auth.spi.LoginModule.initialize()
-         */
         public void initialize(Subject subject,
-                CallbackHandler callbackHandler, Map sharedState, Map options) {
+                CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {
 
             this.cbHandler = callbackHandler;
             initCalled = true;
@@ -607,7 +607,7 @@
      * created.<br>
      */
     public static class TestCallbackHandler implements CallbackHandler {
-        protected static ArrayList instances = new ArrayList();
+        protected static ArrayList<TestCallbackHandler> instances = new ArrayList<TestCallbackHandler>();
 
         /**
          * Returns number of the instances tracked.
@@ -639,6 +639,7 @@
         }
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         Configuration.setConfiguration(new TestConfig());
@@ -817,11 +818,12 @@
      * Make sure that the proper (context) class loader is used.
      */
     public void testLogin_minus1() throws Exception {
-        final ArrayList requests = new ArrayList();
+        final ArrayList<String> requests = new ArrayList<String>();
         ClassLoader saveCCL = Thread.currentThread().getContextClassLoader();
 
         ClassLoader testClassLoader = new ClassLoader() {
-            protected synchronized Class loadClass(String klassName,
+            @Override
+            protected synchronized Class<?> loadClass(String klassName,
                     boolean resolve) throws ClassNotFoundException {
                 requests.add(klassName);
                 return super.loadClass(klassName, resolve);
@@ -1831,8 +1833,8 @@
         final DomainCombiner dc = new SubjectDomainCombiner(dummySubj);
         AccessControlContext acc = new AccessControlContext(AccessController
                 .getContext(), dc);
-        PrivilegedExceptionAction action = new PrivilegedExceptionAction() {
-            public Object run() throws Exception {
+        PrivilegedExceptionAction<Void> action = new PrivilegedExceptionAction<Void>() {
+            public Void run() throws Exception {
                 implTestContextUsage(true, dc);
                 return null;
             }
@@ -1853,8 +1855,8 @@
         final DomainCombiner dc = new SubjectDomainCombiner(dummySubj);
         AccessControlContext acc = new AccessControlContext(AccessController
                 .getContext(), dc);
-        PrivilegedExceptionAction action = new PrivilegedExceptionAction() {
-            public Object run() throws Exception {
+        PrivilegedExceptionAction<Void> action = new PrivilegedExceptionAction<Void>() {
+            public Void run() throws Exception {
                 implTestContextUsage(false, dc);
                 return null;
             }
@@ -1904,6 +1906,7 @@
             accCtor = AccessController.getContext();
         }
 
+        @Override
         public void handle(Callback[] cbs) {
             accHandle = AccessController.getContext();
         }
@@ -1962,12 +1965,14 @@
             accCtor = AccessController.getContext();
         }
 
+        @Override
         public void initialize(Subject subject,
-                CallbackHandler callbackHandler, Map sharedState, Map options) {
+                CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {
             accInit = AccessController.getContext();
             super.initialize(subject, callbackHandler, sharedState, options);
         }
 
+        @Override
         public boolean login() throws LoginException {
             accLogin = AccessController.getContext();
             if (cbHandler != null) {
@@ -1982,23 +1987,26 @@
             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();
         }
     }
     /**
-     * The real implementatio of TestContextUsage_0 and TestContextUsage_1 
+     * The real implementation of TestContextUsage_0 and TestContextUsage_1 
      * methods.
      * @param useInstalledConfig
      * @param dc - which domain combiner to test for
@@ -2103,9 +2111,9 @@
      * @return <code>true</code> is the name is in the list, 
      * <code>false</code> otherwise. 
      */
-    private static boolean lookupAuthPermission(ArrayList al, String name) {
+    private static boolean lookupAuthPermission(ArrayList<Permission> al, String name) {
         for (int i = 0; i < al.size(); i++) {
-            Permission p = (Permission) al.get(i);
+            Permission p = al.get(i);
             if (p instanceof AuthPermission && name.equals(p.getName())) {
                 return true;
             }
@@ -2119,19 +2127,20 @@
     public void testSecurityManagerUsage() throws Exception {
         // 1. create a special-purpose SecurityManager which keeps track 
         // of Permissions checked
-        final ArrayList requests = new ArrayList();
+        final ArrayList<Permission> requests = new ArrayList<Permission>();
         // a list of permissions allowed - just to make sure I'll be able to 
         // set security manager back.
-        final ArrayList allowedPerms = new ArrayList();
+        final ArrayList<BasicPermission> allowedPerms = new ArrayList<BasicPermission>();
         //
         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 = (Permission) allowedPerms.get(i);
+                    Permission good = allowedPerms.get(i);
                     if (good.equals(p)) {
                         return;
                     }
@@ -2154,8 +2163,8 @@
         try {
             System.setSecurityManager(sm);
 
-            AccessController.doPrivileged(new PrivilegedAction() {
-                public Object run() {
+            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                public Void run() {
                     implTestSecurityManagerUsage(requests, allowedPerms);
                     return null;
                 }
@@ -2175,8 +2184,8 @@
      * @param requests
      * @param allowedPerms
      */
-    private void implTestSecurityManagerUsage(ArrayList requests,
-            ArrayList allowedPerms) {
+    private void implTestSecurityManagerUsage(ArrayList<Permission> requests,
+            ArrayList<BasicPermission> 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/org/apache/harmony/auth/tests/javax/security/auth/login/LoginContext2Test.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/LoginContext2Test.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/LoginContext2Test.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/LoginContext2Test.java Mon Oct 16 18:12:03 2006
@@ -38,7 +38,7 @@
         MyPrincipal pri = new MyPrincipal();
         HashSet<Principal> set = new HashSet<Principal>();
         set.add(pri);
-        Subject sub = new Subject(false, set, new HashSet(), new HashSet());
+        Subject sub = new Subject(false, set, new HashSet<Object>(), new HashSet<Object>());
         Configuration.setConfiguration(new MyConfig());
         LoginContext context = new LoginContext("moduleName", sub);
         context.login();
@@ -53,16 +53,18 @@
         assertNotNull(context.getSubject());
     }    
     static class MyConfig extends Configuration{
-        AppConfigurationEntry[] entries = new AppConfigurationEntry[]{new AppConfigurationEntry(MyModule.class.getName(), LoginModuleControlFlag.REQUIRED, new HashMap())};
+        AppConfigurationEntry[] entries = new AppConfigurationEntry[]{new AppConfigurationEntry(MyModule.class.getName(), LoginModuleControlFlag.REQUIRED, new HashMap<String, Object>())};
+        @Override
         public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
             return entries;
         }
+        @Override
         public void refresh() {
         }
     }
     public static class MyModule implements LoginModule{
         Subject sub;
-        public void MyModule(){
+        public MyModule(){
         }
         public boolean abort() throws LoginException {
             return false;
@@ -86,6 +88,7 @@
         public String getName() {
             return name;
         }
+        @Override
         public String toString(){
             return name; 
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/LoginContextTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/LoginContextTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/LoginContextTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/LoginContextTest.java Mon Oct 16 18:12:03 2006
@@ -52,16 +52,13 @@
     // system property to specify another login configuration file 
     private static final String AUTH_LOGIN_CONFIG = "java.security.auth.login.config";
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(LoginContextTest.class);
-    }
-
     private static final String moduleName = "moduleName";
 
-    private Subject subject = new Subject();
+    private final Subject subject = new Subject();
 
-    private MyCallbackHandler handler = new MyCallbackHandler();
+    private final MyCallbackHandler handler = new MyCallbackHandler();
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
 
@@ -208,7 +205,7 @@
      */
     public final void testLC_String_LoginModuleInitialize() throws Exception {
 
-        Hashtable options = new Hashtable();
+        Hashtable<String, Object> options = new Hashtable<String, Object>();
 
         // add required module to the current configuration
         MyConfig.addRequired("MyLoginModule", options);
@@ -223,7 +220,7 @@
         // only one module must be created
         assertEquals("Number of modules", 1, MyLoginModule.list.size());
 
-        MyLoginModule module = (MyLoginModule) MyLoginModule.list.get(0);
+        MyLoginModule module = MyLoginModule.list.get(0);
 
         // login context instantiates subject object itself. 
         assertNotNull("Subject", module.subject);
@@ -368,7 +365,7 @@
     public final void testLC_StringCallbackHandler_LoginModuleInitialize()
             throws Exception {
 
-        Hashtable options = new Hashtable();
+        Hashtable<String, Object> options = new Hashtable<String, Object>();
 
         // add required module to the current configuration
         MyConfig.addRequired("MyLoginModule", options);
@@ -383,7 +380,7 @@
         // only one module must be created
         assertEquals("Number of modules", 1, MyLoginModule.list.size());
 
-        MyLoginModule module = (MyLoginModule) MyLoginModule.list.get(0);
+        MyLoginModule module = MyLoginModule.list.get(0);
 
         // login context instantiates subject object itself. 
         assertNotNull("Subject", module.subject);
@@ -531,7 +528,7 @@
     public final void testLC_StringSubject_LoginModuleInitialize()
             throws Exception {
 
-        Hashtable options = new Hashtable();
+        Hashtable<String, Object> options = new Hashtable<String, Object>();
 
         // add required module to the current configuration
         MyConfig.addRequired("MyLoginModule", options);
@@ -546,7 +543,7 @@
         // only one module must be created
         assertEquals("Number of modules", 1, MyLoginModule.list.size());
 
-        MyLoginModule module = (MyLoginModule) MyLoginModule.list.get(0);
+        MyLoginModule module = MyLoginModule.list.get(0);
 
         // login context has provided subject 
         assertTrue("Subject", module.subject == subject);
@@ -677,7 +674,7 @@
     public final void testLC_StringSubjectCallbackHandler_LoginModuleInitialize()
             throws Exception {
 
-        Hashtable options = new Hashtable();
+        Hashtable<String, Object> options = new Hashtable<String, Object>();
 
         // add required module to the current configuration
         MyConfig.addRequired("MyLoginModule", options);
@@ -692,7 +689,7 @@
         // only one module must be created
         assertEquals("Number of modules", 1, MyLoginModule.list.size());
 
-        MyLoginModule module = (MyLoginModule) MyLoginModule.list.get(0);
+        MyLoginModule module = MyLoginModule.list.get(0);
 
         // login context has provided subject 
         assertTrue("Subject", module.subject == subject);
@@ -803,7 +800,7 @@
             try {
                 // Regression for HARMONY-771
                 new LoginContext("0"); 
-                TestCase.fail("No expected SecurityException");
+                fail("No expected SecurityException");
             } catch (SecurityException e) {
             }
         }
@@ -813,32 +810,27 @@
 
         private String appName;
 
-        private ArrayList entries;
+        private ArrayList<AppConfigurationEntry> entries;
 
         public MyConfig() {
-            entries = new ArrayList();
+            entries = new ArrayList<AppConfigurationEntry>();
         }
 
-        public AppConfigurationEntry[] getAppConfigurationEntry(
-                String applicationName) {
-
+        @Override
+        public AppConfigurationEntry[] getAppConfigurationEntry(String applicationName) {
             appName = applicationName;
-
             if (entries != null) {
                 if (entries.size() == 0) {
                     return new AppConfigurationEntry[0];
-                } else {
-                    AppConfigurationEntry[] appEntries = new AppConfigurationEntry[entries
-                            .size()];
-
-                    entries.toArray(appEntries);
-
-                    return appEntries;
                 }
+                AppConfigurationEntry[] appEntries = new AppConfigurationEntry[entries.size()];
+                entries.toArray(appEntries);
+                return appEntries;
             }
             return null;
         }
 
+        @Override
         public void refresh() {
         }
 
@@ -865,8 +857,8 @@
         /**
          * Appends required login module to the current configuration
          */
-        public static void addRequired(String name, Map options) {
-            ArrayList list = ((MyConfig) Configuration.getConfiguration()).entries;
+        public static void addRequired(String name, Map<String, ?> options) {
+            ArrayList<AppConfigurationEntry> list = ((MyConfig) Configuration.getConfiguration()).entries;
 
             AppConfigurationEntry entry = new AppConfigurationEntry(
                     LoginContextTest.class.getName() + '$' + name,
@@ -891,10 +883,10 @@
 
     public static class MyLoginModule implements LoginModule {
 
-        public static ArrayList list = new ArrayList();
+        public static ArrayList<MyLoginModule> list = new ArrayList<MyLoginModule>();
 
         public static void reset() {
-            list = new ArrayList();
+            list = new ArrayList<MyLoginModule>();
         }
 
         public boolean aborted;
@@ -911,9 +903,9 @@
 
         public CallbackHandler handler;
 
-        public Map sharedState;
+        public Map<String, ?> sharedState;
 
-        public Map options;
+        public Map<String, ?> options;
 
         public MyLoginModule() {
             list.add(this);
@@ -940,7 +932,7 @@
         }
 
         public void initialize(Subject subject, CallbackHandler handler,
-                Map sharedState, Map options) {
+                Map<String, ?> sharedState, Map<String, ?> options) {
 
             if (logined || commited || aborted) {
                 throw new AssertionError("MUST be initialized first");
@@ -983,8 +975,8 @@
             return false;
         }
 
-        public void initialize(Subject arg0, CallbackHandler arg1, Map arg2,
-                Map arg3) {
+        public void initialize(Subject arg0, CallbackHandler arg1, Map<String, ?> arg2,
+                Map<String, ?> arg3) {
         }
 
         public boolean login() throws LoginException {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountExceptionTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountExceptionTest.java Mon Oct 16 18:12:03 2006
@@ -34,10 +34,7 @@
 
 public class AccountExceptionTest extends SerializationTest {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(AccountExceptionTest.class);
-    }
-
+    @Override
     protected Object[] getData() {
         return new Object[] {new AccountException("message")};
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountExpiredExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountExpiredExceptionTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountExpiredExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountExpiredExceptionTest.java Mon Oct 16 18:12:03 2006
@@ -32,10 +32,7 @@
 
 public class AccountExpiredExceptionTest extends SerializationTest {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(AccountExpiredExceptionTest.class);
-    }
-
+    @Override
     protected Object[] getData() {
         return new Object[] {new AccountExpiredException("message")};
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountLockedExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountLockedExceptionTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountLockedExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountLockedExceptionTest.java Mon Oct 16 18:12:03 2006
@@ -34,10 +34,7 @@
 
 public class AccountLockedExceptionTest extends SerializationTest {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(AccountLockedExceptionTest.class);
-    }
-
+    @Override
     protected Object[] getData() {
         return new Object[] {new AccountLockedException("message")};
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountNotFoundExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountNotFoundExceptionTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountNotFoundExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/AccountNotFoundExceptionTest.java Mon Oct 16 18:12:03 2006
@@ -33,10 +33,7 @@
 
 public class AccountNotFoundExceptionTest extends SerializationTest {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(AccountNotFoundExceptionTest.class);
-    }
-
+    @Override
     protected Object[] getData() {
         return new Object[] {new AccountNotFoundException("message")};
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/CredentialExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/CredentialExceptionTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/CredentialExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/CredentialExceptionTest.java Mon Oct 16 18:12:03 2006
@@ -34,10 +34,7 @@
 
 public class CredentialExceptionTest extends SerializationTest {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(CredentialExceptionTest.class);
-    }
-
+    @Override
     protected Object[] getData() {
         return new Object[] {new CredentialException("message")};
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/CredentialExpiredExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/CredentialExpiredExceptionTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/CredentialExpiredExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/CredentialExpiredExceptionTest.java Mon Oct 16 18:12:03 2006
@@ -33,10 +33,7 @@
 
 public class CredentialExpiredExceptionTest extends SerializationTest {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(CredentialExpiredExceptionTest.class);
-    }
-
+    @Override
     protected Object[] getData() {
         return new Object[] {new CredentialExpiredException("message")};
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/CredentialNotFoundExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/CredentialNotFoundExceptionTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/CredentialNotFoundExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/CredentialNotFoundExceptionTest.java Mon Oct 16 18:12:03 2006
@@ -33,10 +33,7 @@
 
 public class CredentialNotFoundExceptionTest extends SerializationTest {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(CredentialNotFoundExceptionTest.class);
-    }
-
+    @Override
     protected Object[] getData() {
         return new Object[] {new CredentialNotFoundException("message")};
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/FailedLoginExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/FailedLoginExceptionTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/FailedLoginExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/FailedLoginExceptionTest.java Mon Oct 16 18:12:03 2006
@@ -33,10 +33,7 @@
 
 public class FailedLoginExceptionTest extends SerializationTest {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(FailedLoginExceptionTest.class);
-    }
-
+    @Override
     protected Object[] getData() {
         return new Object[] {new FailedLoginException("message")};
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/LoginExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/LoginExceptionTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/LoginExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/serialization/LoginExceptionTest.java Mon Oct 16 18:12:03 2006
@@ -33,10 +33,7 @@
 
 public class LoginExceptionTest extends SerializationTest {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(LoginExceptionTest.class);
-    }
-
+    @Override
     protected Object[] getData() {
         return new Object[] {new LoginException("message")};
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/AuthPermissionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/AuthPermissionTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/AuthPermissionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/AuthPermissionTest.java Mon Oct 16 18:12:03 2006
@@ -33,6 +33,7 @@
 
 public class AuthPermissionTest extends SerializationTest {
 
+    @Override
     protected Object[] getData() {
         return new Object[] {new AuthPermission("name", "read")};
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/DestroyFailedExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/DestroyFailedExceptionTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/DestroyFailedExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/DestroyFailedExceptionTest.java Mon Oct 16 18:12:03 2006
@@ -33,10 +33,7 @@
 
 public class DestroyFailedExceptionTest extends SerializationTest {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(DestroyFailedExceptionTest.class);
-    }
-
+    @Override
     protected Object[] getData() {
         return new Object[] {new DestroyFailedException("message")};
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/PrivateCredentialPermissionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/PrivateCredentialPermissionTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/PrivateCredentialPermissionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/PrivateCredentialPermissionTest.java Mon Oct 16 18:12:03 2006
@@ -33,6 +33,7 @@
 
 public class PrivateCredentialPermissionTest extends SerializationTest {
 
+    @Override
     protected Object[] getData() {
         return new Object[] {new PrivateCredentialPermission("a.b.Cred a.c.Princ \"duke\"", "read")};
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/RefreshFailedExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/RefreshFailedExceptionTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/RefreshFailedExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/RefreshFailedExceptionTest.java Mon Oct 16 18:12:03 2006
@@ -34,10 +34,7 @@
 
 public class RefreshFailedExceptionTest extends SerializationTest {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(RefreshFailedExceptionTest.class);
-    }
-
+    @Override
     protected Object[] getData() {
         return new Object[] {new RefreshFailedException("message")};
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/SubjectTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/SubjectTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/SubjectTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/serialization/SubjectTest.java Mon Oct 16 18:12:03 2006
@@ -33,6 +33,7 @@
 
 public class SubjectTest extends SerializationTest {
 
+    @Override
     protected Object[] getData() {
 
         Subject subject = new Subject();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/x500/serialization/X500PrincipalTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/x500/serialization/X500PrincipalTest.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/x500/serialization/X500PrincipalTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/x500/serialization/X500PrincipalTest.java Mon Oct 16 18:12:03 2006
@@ -32,6 +32,7 @@
  */
 public class X500PrincipalTest extends SerializationTest {
 
+    @Override
     protected Object[] getData() {
         return new Object[] {new X500Principal("CN=A"),
                 new X500Principal("CN=A, C=B"),

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/sasl/Sasl1Test.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/sasl/Sasl1Test.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/sasl/Sasl1Test.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/sasl/Sasl1Test.java Mon Oct 16 18:12:03 2006
@@ -27,6 +27,8 @@
 import java.util.Enumeration;
 
 import javax.security.sasl.Sasl;
+import javax.security.sasl.SaslClientFactory;
+import javax.security.sasl.SaslServerFactory;
 
 import junit.framework.TestCase;
 
@@ -35,21 +37,11 @@
  */
 public class Sasl1Test extends TestCase {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(Sasl1Test.class);
-    }
-
     private Provider [] provs;
-    private boolean initProvs = false;
-    /**
-     * Constructor for Sasl2Test.
-     * 
-     * @param arg0
-     */
-    public Sasl1Test(String arg0) {
-        super(arg0);
-    }
+    private boolean initProvs;
 
+
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         if (!initProvs) {
@@ -57,12 +49,13 @@
             initProvs = true;
         }
         if (provs != null) {
-            for (int i = 0; i < provs.length; i++) {
-                Security.removeProvider(provs[i].getName());
+            for (Provider element : provs) {
+                Security.removeProvider(element.getName());
             }
         }
     }
     
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
         if (provs != null) {
@@ -81,7 +74,7 @@
      * All providers are previously removed.
      */
     public void testGetClient() {    
-        Enumeration en = Sasl.getSaslClientFactories();
+        Enumeration<SaslClientFactory> en = Sasl.getSaslClientFactories();
         assertNotNull("List of SaslClientFactories should not be null", en);
         assertFalse("List of SaslClientFactories should not haves elements", en
                 .hasMoreElements());
@@ -96,7 +89,7 @@
      * All providers are previously removed.
      */
     public void testGetSertver() {
-        Enumeration en = Sasl.getSaslServerFactories();
+        Enumeration<SaslServerFactory> en = Sasl.getSaslServerFactories();
         assertNotNull("List of SaslServerFactories should not be null", en);
         assertFalse("List of SaslServerFactories should not have elements", en
                 .hasMoreElements());

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/sasl/Sasl2Test.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/sasl/Sasl2Test.java?view=diff&rev=464764&r1=464763&r2=464764
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/sasl/Sasl2Test.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/sasl/Sasl2Test.java Mon Oct 16 18:12:03 2006
@@ -43,11 +43,6 @@
  * Test for Sasl class
  */
 public class Sasl2Test extends TestCase {
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(Sasl2Test.class);
-    }
-
     Provider[] mProv;
 
     private static final String fClientClass01 = myClientFactory01.class
@@ -59,30 +54,20 @@
     private static final String fServerClass02 = myServerFactory02.class
             .getName();
 
-    /*
-     * @see TestCase#tearDown()
-     */
+
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
         if (mProv != null) {
-            for (int i = 0; i < mProv.length; i++) {
-                Security.removeProvider(mProv[i].getName());
+            for (Provider element : mProv) {
+                Security.removeProvider(element.getName());
             }
         }
     }
 
-    /**
-     * Constructor for Sasl2Test.
-     * 
-     * @param arg0
-     */
-    public Sasl2Test(String arg0) {
-        super(arg0);
-    }
-
     private void addProviders() {
-        for (int i = 0; i < mProv.length; i++) {
-            Security.insertProviderAt(mProv[i], 2);
+        for (Provider element : mProv) {
+            Security.insertProviderAt(element, 2);
         }
     }
 
@@ -120,7 +105,7 @@
 
         addProviders();
 
-        Enumeration en = Sasl.getSaslClientFactories();
+        Enumeration<SaslClientFactory> en = Sasl.getSaslClientFactories();
         assertNotNull("List of SaslClientFactories should not be null", en);
         assertTrue("List of SaslClientFactories should have elements", en
                 .hasMoreElements());
@@ -128,7 +113,7 @@
         String[] mech01 = mm.getMechanismNames(null);
         int l = 0;
         while (en.hasMoreElements()) {
-            SaslClientFactory f = (SaslClientFactory) en.nextElement();
+            SaslClientFactory f = en.nextElement();
             if (f instanceof myClientFactory01) {
                 l++;
                 assertNull("Incorect SaslClient", f.createSaslClient(null,
@@ -170,7 +155,7 @@
                                 .concat(mech[3]), fClientClass01) };
         addProviders();
 
-        Enumeration en = Sasl.getSaslClientFactories();
+        Enumeration<SaslClientFactory> en = Sasl.getSaslClientFactories();
         assertNotNull("List of SaslClientFactories should not be null", en);
         assertTrue("List of SaslClientFactories should have elements", en
                 .hasMoreElements());
@@ -178,7 +163,7 @@
         String[] mech01 = mm.getMechanismNames(null);
         int l = 0;
         while (en.hasMoreElements()) {
-            SaslClientFactory f = (SaslClientFactory) en.nextElement();
+            SaslClientFactory f = en.nextElement();
             if (f instanceof myClientFactory01) {
                 l++;
                 assertNull("Incorect SaslClient", f.createSaslClient(null,
@@ -213,7 +198,7 @@
                         "Testing provider SaslClientFactory - 2", CLNTSRV
                                 .concat(mech[1]), fClientClass01) };
         addProviders();
-        Enumeration en = Sasl.getSaslClientFactories();
+        Enumeration<SaslClientFactory> en = Sasl.getSaslClientFactories();
         assertNotNull("List of SaslClientFactories should not be null", en);
         assertTrue("List of SaslClientFactories should have elements", en
                 .hasMoreElements());
@@ -222,7 +207,7 @@
         String[] mech01 = mm1.getMechanismNames(null);
         int l = 0;
         while (en.hasMoreElements()) {
-            SaslClientFactory f = (SaslClientFactory) en.nextElement();
+            SaslClientFactory f = en.nextElement();
             if (f instanceof myClientFactory01) {
                 l++;
                 assertTrue(f instanceof myClientFactory01);
@@ -273,7 +258,7 @@
         mProv[0].put(CLNTSRV.concat(mech[3]), fClientClass01);
 
         addProviders();
-        Enumeration en = Sasl.getSaslClientFactories();
+        Enumeration<SaslClientFactory> en = Sasl.getSaslClientFactories();
         assertNotNull("List of SaslClientFactories should not be null", en);
         assertTrue("List of SaslClientFactories should have elements", en
                 .hasMoreElements());
@@ -281,7 +266,7 @@
         String[] mech01 = mm.getMechanismNames(null);
         int l = 0;
         while (en.hasMoreElements()) {
-            SaslClientFactory f = (SaslClientFactory) en.nextElement();
+            SaslClientFactory f = en.nextElement();
             if ((f instanceof myClientFactory01)) {
                 l++;
                 assertNull("Incorect SaslClient", f.createSaslClient(null,
@@ -321,18 +306,18 @@
                 (new SpiEngUtils()).new MyProvider("MySaslServerProvider4",
                         "Testing provider SaslServerFactory - 4", SRVSSRV
                                 .concat(mech[0]), fServerClass02) };
-        for (int i = 0; i < mProv.length; i++) {
+        for (Provider element : mProv) {
             for (int j = 1; j < mech.length; j++) {
-                mProv[i].put(SRVSSRV.concat(mech[j]).concat(mech[j]),
+                element.put(SRVSSRV.concat(mech[j]).concat(mech[j]),
                         fServerClass02);
-                mProv[i].put(SRVSSRV.concat(mech[j]).concat(mech[j]),
+                element.put(SRVSSRV.concat(mech[j]).concat(mech[j]),
                         fServerClass01);
             }
-            mProv[i].put(SRVSSRV.concat(mech[0]).concat(mech[0]),
+            element.put(SRVSSRV.concat(mech[0]).concat(mech[0]),
                     fServerClass01);
         }
         addProviders();
-        Enumeration en = Sasl.getSaslServerFactories();
+        Enumeration<SaslServerFactory> en = Sasl.getSaslServerFactories();
         assertNotNull("List of SaslServerFactories should not be null", en);
         assertTrue("List of SaslServerFactories should have elements", en
                 .hasMoreElements());
@@ -340,7 +325,7 @@
         String[] mech01 = mm01.getMechanismNames(null);
         int l = 0;
         while (en.hasMoreElements()) {
-            SaslServerFactory f = (SaslServerFactory) en.nextElement();
+            SaslServerFactory f = en.nextElement();
             if (f instanceof myServerFactory02) {
                 l++;
                 try {
@@ -392,7 +377,7 @@
                                 .concat(mech[3]), fServerClass01) };
         addProviders();
 
-        Enumeration en = Sasl.getSaslServerFactories();
+        Enumeration<SaslServerFactory> en = Sasl.getSaslServerFactories();
         assertNotNull("List of SaslServerFactories should not be null", en);
         assertTrue("List of SaslServerFactories should have elements", en
                 .hasMoreElements());
@@ -400,7 +385,7 @@
         String[] mech01 = mm01.getMechanismNames(null);
         int l = 0;
         while (en.hasMoreElements()) {
-            SaslServerFactory f = (SaslServerFactory) en.nextElement();
+            SaslServerFactory f = en.nextElement();
             if (f instanceof myServerFactory01) {
                 l++;
                 assertNull("Incorect SaslServer", f.createSaslServer(null,
@@ -435,7 +420,7 @@
                         "Testing provider SaslServerFactory - 2", SRVSSRV
                                 .concat(mech[1]), fServerClass01) };
         addProviders();
-        Enumeration en = Sasl.getSaslServerFactories();
+        Enumeration<SaslServerFactory> en = Sasl.getSaslServerFactories();
         assertNotNull("List of SaslServerFactories should not be null", en);
         assertTrue("List of SaslServerFactories should have elements", en
                 .hasMoreElements());
@@ -444,7 +429,7 @@
         String[] mech01 = mm1.getMechanismNames(null);
         int l = 0;
         while (en.hasMoreElements()) {
-            SaslServerFactory f = (SaslServerFactory) en.nextElement();
+            SaslServerFactory f = en.nextElement();
             if (f instanceof myServerFactory01) {
                 l++;
                 assertTrue(f instanceof myServerFactory01);
@@ -495,13 +480,13 @@
         mProv[0].put(SRVSSRV.concat(mech[3]), fServerClass02);
 
         addProviders();
-        Enumeration en = Sasl.getSaslServerFactories();
+        Enumeration<SaslServerFactory> en = Sasl.getSaslServerFactories();
         assertNotNull("List of SaslServerFactories should not be null", en);
         assertTrue("List of SaslServerFactories should have elements", en
                 .hasMoreElements());
         int l = 0;
         while (en.hasMoreElements()) {
-            SaslServerFactory f = (SaslServerFactory) en.nextElement();
+            SaslServerFactory f = en.nextElement();
             if ((f instanceof myServerFactory02)) {
                 l++;
                 try {
@@ -526,13 +511,13 @@
             super();
         }
 
-        public String[] getMechanismNames(Map map) {
+        public String[] getMechanismNames(Map<String, ?> map) {
             return new String[] { "aaaa", "dddddddddddd",
                     "llllllllll sssssssss aaaaaaaaaaa c" };
         }
 
         public SaslServer createSaslServer(String mech, String prot,
-                String srvName, Map prop, CallbackHandler ch) throws SaslException {
+                String srvName, Map<String, ?> prop, CallbackHandler ch) throws SaslException {
             return null;
         }
     }
@@ -542,12 +527,12 @@
             super();
         }
 
-        public String[] getMechanismNames(Map map) {
+        public String[] getMechanismNames(Map<String, ?> map) {
             return null;
         }
 
         public SaslServer createSaslServer(String mech, String prot,
-                String srvName, Map prop, CallbackHandler ch) throws SaslException {
+                String srvName, Map<String, ?> prop, CallbackHandler ch) throws SaslException {
             if (prot == null) {
                 throw new SaslException("Protocol is null");
             }
@@ -560,12 +545,12 @@
             super();
         }
 
-        public String[] getMechanismNames(Map map) {
+        public String[] getMechanismNames(Map<String, ?> map) {
             return new String[] { "a1", "a2", "a3", "a4", "a5" };
         }
 
         public SaslClient createSaslClient(String[] mech, String prot, String auth,
-                String srvName, Map prop, CallbackHandler ch) throws SaslException {
+                String srvName, Map<String, ?> prop, CallbackHandler ch) throws SaslException {
             return null;
         }
     }
@@ -575,12 +560,12 @@
             super();
         }
 
-        public String[] getMechanismNames(Map map) {
+        public String[] getMechanismNames(Map<String, ?> map) {
             return new String[] { "a11", "a22", "a33", "a44", "a55", "" };
         }
 
         public SaslClient createSaslClient(String[] mech, String prot, String auth,
-                String srvName, Map prop, CallbackHandler ch) throws SaslException {
+                String srvName, Map<String, ?> prop, CallbackHandler ch) throws SaslException {
             return null;
         }
     }



Mime
View raw message