geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yunfen...@apache.org
Subject svn commit: r680897 - in /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src: main/java/org/apache/geronimo/st/core/internal/DependencyManager.java test/java/org/apache/geronimo/st/core/internal/DependencyHelperTest.java
Date Wed, 30 Jul 2008 01:18:42 GMT
Author: yunfengma
Date: Tue Jul 29 18:18:42 2008
New Revision: 680897

URL: http://svn.apache.org/viewvc?rev=680897&view=rev
Log:
GERONIMODEVTOOLS-429 Testcase failures in org.apache.geronimo.st.core plugin using IBM JDK

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyManager.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/DependencyHelperTest.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyManager.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyManager.java?rev=680897&r1=680896&r2=680897&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyManager.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyManager.java
Tue Jul 29 18:18:42 2008
@@ -19,7 +19,7 @@
 
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.HashSet;
+import java.util.LinkedHashSet;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
@@ -75,14 +75,14 @@
 
         Set parents = (Set) childToParentMap.get(child);
         if (parents == null) {
-            parents = new HashSet();
+            parents = new LinkedHashSet();
             childToParentMap.put(child, parents);
         }
         parents.add(parent);
 
         Set children = (Set) parentToChildMap.get(parent);
         if (children == null) {
-            children = new HashSet();
+            children = new LinkedHashSet();
             parentToChildMap.put(parent, children);
         }
         children.add(child);
@@ -151,7 +151,7 @@
 
         Set existingParents = (Set) childToParentMap.get(child);
         if (existingParents == null) {
-            existingParents = new HashSet(parents);
+            existingParents = new LinkedHashSet(parents);
             childToParentMap.put(child, existingParents);
         }
         else {
@@ -162,7 +162,7 @@
             Object startParent = i.next();
             Set children = (Set) parentToChildMap.get(startParent);
             if (children == null) {
-                children = new HashSet();
+                children = new LinkedHashSet();
                 parentToChildMap.put(startParent, children);
             }
             children.add(child);
@@ -188,7 +188,7 @@
         }
 
         Trace.tracePoint("Exit", "DependencyManager.getParents", parents.size() );
-        return new HashSet(parents);
+        return new LinkedHashSet(parents);
     }
 
 
@@ -208,6 +208,6 @@
         }
 
         Trace.tracePoint("Exit ", "DependencyManager.getChildren", children.size() );
-        return new HashSet(children);
+        return new LinkedHashSet(children);
     }
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/DependencyHelperTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/DependencyHelperTest.java?rev=680897&r1=680896&r2=680897&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/DependencyHelperTest.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/DependencyHelperTest.java
Tue Jul 29 18:18:42 2008
@@ -22,6 +22,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
 import javax.xml.bind.JAXBContext;
@@ -540,9 +541,9 @@
         jaxbReordered = dh.reorderJAXBElements( jaxbElements );
         assertEquals( jaxbReordered.size(),jaxbElements.size() );
         assertEquals( jaxbReordered.get(0),jaxbElements.get(4) );       // jaxbElement7
-        assertEquals( jaxbReordered.get(1),jaxbElements.get(8) );       // jaxbElement3
-        assertEquals( jaxbReordered.get(2),jaxbElements.get(7) );       // jaxbElement4
-        assertEquals( jaxbReordered.get(3),jaxbElements.get(0) );       // jaxbElement11
+        assertEquals( jaxbReordered.get(1),jaxbElements.get(0) );       // jaxbElement3
+        assertEquals( jaxbReordered.get(2),jaxbElements.get(8) );       // jaxbElement4
+        assertEquals( jaxbReordered.get(3),jaxbElements.get(7) );       // jaxbElement11
         assertEquals( jaxbReordered.get(4),jaxbElements.get(1) );       // jaxbElement10
         assertEquals( jaxbReordered.get(5),jaxbElements.get(2) );       // jaxbElement9
         assertEquals( jaxbReordered.get(6),jaxbElements.get(6) );       // jaxbElement5
@@ -800,10 +801,10 @@
         jaxbElements.add( (JAXBElement)jaxbElement3 );                  // Element 5
         jaxbReordered = dh.reorderJAXBElements( jaxbElements );
         assertEquals( jaxbReordered.size(),jaxbElements.size() );
-        assertEquals( jaxbReordered.get(0),jaxbElements.get(4) );       // jaxbElement12
-        assertEquals( jaxbReordered.get(1),jaxbElements.get(1) );       // jaxbElement7
-        assertEquals( jaxbReordered.get(2),jaxbElements.get(3) );       // jaxbElement5
-        assertEquals( jaxbReordered.get(3),jaxbElements.get(2) );       // jaxbElement6
+        assertEquals( jaxbReordered.get(0),jaxbElements.get(1) );       // jaxbElement12
+        assertEquals( jaxbReordered.get(1),jaxbElements.get(3) );       // jaxbElement7
+        assertEquals( jaxbReordered.get(2),jaxbElements.get(2) );       // jaxbElement5
+        assertEquals( jaxbReordered.get(3),jaxbElements.get(4) );       // jaxbElement6
         assertEquals( jaxbReordered.get(4),jaxbElements.get(0) );       // jaxbElement13
         assertEquals( jaxbReordered.get(5),jaxbElements.get(5) );       // jaxbElement2
         jaxbElements.clear();



Mime
View raw message