geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r619757 - /geronimo/server/branches/2.1/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/realm/providers/GeronimoPropertiesFileMappedPasswordCredentialLoginModuleTest.java
Date Fri, 08 Feb 2008 03:56:55 GMT
Author: dwoods
Date: Thu Feb  7 19:56:55 2008
New Revision: 619757

URL: http://svn.apache.org/viewvc?rev=619757&view=rev
Log:
GERONIMO-3830 Test assumes a specific Set ordering, which fails on Java 6.  Verified the test
still passes on Sun 1.5.0_14.  Toby, thanks for the patch.

Modified:
    geronimo/server/branches/2.1/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/realm/providers/GeronimoPropertiesFileMappedPasswordCredentialLoginModuleTest.java

Modified: geronimo/server/branches/2.1/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/realm/providers/GeronimoPropertiesFileMappedPasswordCredentialLoginModuleTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/realm/providers/GeronimoPropertiesFileMappedPasswordCredentialLoginModuleTest.java?rev=619757&r1=619756&r2=619757&view=diff
==============================================================================
--- geronimo/server/branches/2.1/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/realm/providers/GeronimoPropertiesFileMappedPasswordCredentialLoginModuleTest.java
(original)
+++ geronimo/server/branches/2.1/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/realm/providers/GeronimoPropertiesFileMappedPasswordCredentialLoginModuleTest.java
Thu Feb  7 19:56:55 2008
@@ -20,15 +20,16 @@
 
 package org.apache.geronimo.security.realm.providers;
 
-import java.util.Set;
-import java.util.HashSet;
+import java.util.Comparator;
 import java.util.Iterator;
+import java.util.Set;
+import java.util.TreeSet;
 
 import junit.framework.TestCase;
 import org.apache.geronimo.security.jaas.NamedUsernamePasswordCredential;
 
 /**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
  */
 public class GeronimoPropertiesFileMappedPasswordCredentialLoginModuleTest extends TestCase
{
     private GeronimoPropertiesFileMappedPasswordCredentialLoginModule loginModule;
@@ -36,7 +37,11 @@
 
     protected void setUp() {
         loginModule = new GeronimoPropertiesFileMappedPasswordCredentialLoginModule();
-        passwordCredentials = new HashSet<NamedUsernamePasswordCredential>();
+        passwordCredentials = new TreeSet<NamedUsernamePasswordCredential>(new Comparator()
{
+            public int compare(Object o1, Object o2) {
+                return ((NamedUsernamePasswordCredential)o1).getName().compareTo(((NamedUsernamePasswordCredential)o2).getName());
+            }
+        });
     }
 
     public void testParsingOne() throws Exception {



Mime
View raw message