harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r528380 - /harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/KeyFactory2Test.java
Date Fri, 13 Apr 2007 08:01:17 GMT
Author: pyang
Date: Fri Apr 13 01:01:15 2007
New Revision: 528380

URL: http://svn.apache.org/viewvc?view=rev&rev=528380
Log:
Apply patch for HARMONY-3616([classlib][security]KeyFactory2Test actually does not get key
algorithm for test on Harmony.)

Modified:
    harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/KeyFactory2Test.java

Modified: harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/KeyFactory2Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/KeyFactory2Test.java?view=diff&rev=528380&r1=528379&r2=528380
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/KeyFactory2Test.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/KeyFactory2Test.java
Fri Apr 13 01:01:15 2007
@@ -345,15 +345,17 @@
 
 	protected void setUp() {
 		if (keyfactAlgs == null) {
-			Provider[] providers = Security.getProviders();
-			if (providers == null) {
-				fail("No providers found");
-			}
-			// Arbitrarily uUse the first provider that supports
-			// KeyFactory algorithms
-			providerName = providers[0].getName();
-			keyfactAlgs = getKeyFactoryAlgorithms(providerName);
-		}
+            Provider[] providers = Security.getProviders();
+            // Arbitrarily use the first provider that supports
+            // KeyFactory algorithms
+            for (Provider provider : providers) {
+                providerName = provider.getName();
+                keyfactAlgs = getKeyFactoryAlgorithms(providerName);
+                if (keyfactAlgs.length != 0) {
+                    break;
+                }
+            }
+        }
 	}
 
 	/*
@@ -403,4 +405,4 @@
 		}
 		return null;
 	}
-}
\ No newline at end of file
+}



Mime
View raw message