harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r394021 - in /incubator/harmony/enhanced/classlib/trunk/modules: luni/src/main/java/java/util/ security/src/test/java/common/java/security/ security/src/test/java/common/tests/api/java/security/
Date Fri, 14 Apr 2006 05:38:51 GMT
Author: mloenko
Date: Thu Apr 13 22:38:48 2006
New Revision: 394021

URL: http://svn.apache.org/viewcvs?rev=394021&view=rev
Log:
fixed failure described in the mail thread 'Re: svn commit: r393797 [1/3]...'

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/AlgorithmParametersTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/KeyStore1Test.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/KeyStore2Test.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/ProviderTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java?rev=394021&r1=394020&r2=394021&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java
Thu Apr 13 22:38:48 2006
@@ -403,7 +403,7 @@
 	 * 
 	 * @return a Set of the mappings
 	 */
-	public Set entrySet() {
+	public Set<Map.Entry<K,V>> entrySet() {
 		return new Collections.SynchronizedSet(new AbstractSet<Map.Entry<K,V>>() {
 			public int size() {
 				return elementCount;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/AlgorithmParametersTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/AlgorithmParametersTest.java?rev=394021&r1=394020&r2=394021&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/AlgorithmParametersTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/AlgorithmParametersTest.java
Thu Apr 13 22:38:48 2006
@@ -22,6 +22,7 @@
 package java.security;
 
 import junit.framework.TestCase;
+import java.security.spec.AlgorithmParameterSpec;
 
 /**
  * Tests for <code>AlgorithmParameters</code> class constructors and
@@ -178,7 +179,8 @@
 		}
 		
 		try {
-			ap.getParameterSpec(new Object().getClass());
+		    //make it compilable on 1.5
+			ap.getParameterSpec((Class<AlgorithmParameterSpec>)new Object().getClass());
 			fail("getParameterSpec(): No expected InvalidParameterSpecException");
 		} catch (java.security.spec.InvalidParameterSpecException e) {
 		}
@@ -215,7 +217,8 @@
 		}		
 		
 		try {
-			ap.getParameterSpec(new Object().getClass());
+			//make it compilable on 1.5
+			ap.getParameterSpec((Class<AlgorithmParameterSpec>)new Object().getClass());
 		} catch (java.security.spec.InvalidParameterSpecException e) {
 			fail(e.toString());
 		}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/KeyStore1Test.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/KeyStore1Test.java?rev=394021&r1=394020&r2=394021&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/KeyStore1Test.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/KeyStore1Test.java
Thu Apr 13 22:38:48 2006
@@ -1085,11 +1085,17 @@
             for (int j = 0; j < aliases.length; j++)  {
                 assertTrue("Incorrect class entry 2", 
                         kss[i].entryInstanceOf(aliases[j], pKey.getClass()));
+
+                //make it compilable on 1.5
+                Class c = privKey.getClass();
                 assertFalse("Incorrect class entry 3", 
-                        kss[i].entryInstanceOf(aliases[j], privKey.getClass()));
+                        kss[i].entryInstanceOf(aliases[j], (Class<KeyStore.Entry>)c
));
             }
+
+            //make it compilable on 1.5
+            Class c = privKey.getClass();
             assertFalse("Incorrect class entry 4", 
-                kss[i].entryInstanceOf(aliasKE, privKey.getClass()));
+                kss[i].entryInstanceOf(aliasKE, (Class<KeyStore.Entry>)c ));
             assertTrue("Incorrect class entry 5", 
                 kss[i].entryInstanceOf(aliasKE, pKey.getClass()));            
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/KeyStore2Test.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/KeyStore2Test.java?rev=394021&r1=394020&r2=394021&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/KeyStore2Test.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/KeyStore2Test.java
Thu Apr 13 22:38:48 2006
@@ -176,8 +176,10 @@
 
         keyS.load(lParam);
 
+        //make it compilable on 1.5
+        Class c = alias.getClass();
         assertFalse("Incorrect result of entryInstanceOf", keyS
-                .entryInstanceOf(alias, alias.getClass()));
+                .entryInstanceOf(alias, (Class<KeyStore.Entry>)c));
     }
 
     private void checkKeyStoreException(KeyStore keyS)
@@ -202,7 +204,9 @@
         } catch (KeyStoreException e) {
         }
         try {
-            keyS.entryInstanceOf(alias, alias.getClass());
+            //make it compilable on 1.5
+            Class c = alias.getClass();
+            keyS.entryInstanceOf(alias, (Class<KeyStore.Entry>)c);
             fail(eMsg);
         } catch (KeyStoreException e) {
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/ProviderTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/ProviderTest.java?rev=394021&r1=394020&r2=394021&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/ProviderTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/ProviderTest.java
Thu Apr 13 22:38:48 2006
@@ -25,9 +25,24 @@
 		}
 	}
 
+    class MyEntry implements java.util.Map.Entry {
+         public Object getKey() {
+             return null;  
+         }
+
+         public Object getValue() {
+             return null;  
+         }
+
+         public Object setValue(Object value) {
+             return null;  
+         }
+    }
+    
 	TestProvider provTest = new TestProvider("provTest", 1.2,
 			"contains nothings, purely for testing the class");
 
+    
 	/**
 	 * @tests java.security.Provider#entrySet()
 	 */
@@ -35,7 +50,8 @@
 		// test method of java.security.provider.entrySet
 		provTest.put("test.prop", "this is a test property");
 		try {
-			provTest.entrySet().add("another property value");
+            //make it compilable on 1.5
+			provTest.entrySet().add(new MyEntry());
 			fail("was able to modify the entrySet");
 		} catch (UnsupportedOperationException e) {
 			// expected



Mime
View raw message