maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ogusa...@apache.org
Subject svn commit: r720571 - in /maven/mercury/trunk/mercury-md/mercury-md-sat/src: main/java/org/apache/maven/mercury/metadata/sat/DefaultSatSolver.java test/java/org/apache/maven/mercury/metadata/sat/DefaultSatSolverTest.java
Date Tue, 25 Nov 2008 19:41:05 GMT
Author: ogusakov
Date: Tue Nov 25 11:41:05 2008
New Revision: 720571

URL: http://svn.apache.org/viewvc?rev=720571&view=rev
Log:
rolled back Ben's changes - MERCURY-40 as TBD

Modified:
    maven/mercury/trunk/mercury-md/mercury-md-sat/src/main/java/org/apache/maven/mercury/metadata/sat/DefaultSatSolver.java
    maven/mercury/trunk/mercury-md/mercury-md-sat/src/test/java/org/apache/maven/mercury/metadata/sat/DefaultSatSolverTest.java

Modified: maven/mercury/trunk/mercury-md/mercury-md-sat/src/main/java/org/apache/maven/mercury/metadata/sat/DefaultSatSolver.java
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-md/mercury-md-sat/src/main/java/org/apache/maven/mercury/metadata/sat/DefaultSatSolver.java?rev=720571&r1=720570&r2=720571&view=diff
==============================================================================
--- maven/mercury/trunk/mercury-md/mercury-md-sat/src/main/java/org/apache/maven/mercury/metadata/sat/DefaultSatSolver.java
(original)
+++ maven/mercury/trunk/mercury-md/mercury-md-sat/src/main/java/org/apache/maven/mercury/metadata/sat/DefaultSatSolver.java
Tue Nov 25 11:41:05 2008
@@ -23,7 +23,7 @@
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.Comparator;
-import java.util.LinkedHashMap;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -143,7 +143,7 @@
       throw new SatException( "cannot apply policies to a null tree" );
     
     // TODO og: assumption - around 128 GA's per tree. If more - map reallocates - slow down.
-    Map<String, List<MetadataTreeNode>> buckets = new LinkedHashMap<String,
List<MetadataTreeNode>>(128);
+    Map<String, List<MetadataTreeNode>> buckets = new HashMap<String, List<MetadataTreeNode>>(128);
     fillBuckets( buckets, _root );
     sortBuckets( buckets, comparators );
     useBuckets( buckets );
@@ -419,7 +419,7 @@
     if( children == null || children.size() < 1 )
       throw new SatException("there are queries, but not results. Queries: "+queries);
     
-    Map<ArtifactBasicMetadata, List<MetadataTreeNode>> res = new LinkedHashMap<ArtifactBasicMetadata,
List<MetadataTreeNode>>( queries.size() );
+    Map<ArtifactBasicMetadata, List<MetadataTreeNode>> res = new HashMap<ArtifactBasicMetadata,
List<MetadataTreeNode>>( queries.size() );
     for( ArtifactBasicMetadata q : queries )
     {
       List<MetadataTreeNode> bucket = new ArrayList<MetadataTreeNode>(4);

Modified: maven/mercury/trunk/mercury-md/mercury-md-sat/src/test/java/org/apache/maven/mercury/metadata/sat/DefaultSatSolverTest.java
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-md/mercury-md-sat/src/test/java/org/apache/maven/mercury/metadata/sat/DefaultSatSolverTest.java?rev=720571&r1=720570&r2=720571&view=diff
==============================================================================
--- maven/mercury/trunk/mercury-md/mercury-md-sat/src/test/java/org/apache/maven/mercury/metadata/sat/DefaultSatSolverTest.java
(original)
+++ maven/mercury/trunk/mercury-md/mercury-md-sat/src/test/java/org/apache/maven/mercury/metadata/sat/DefaultSatSolverTest.java
Tue Nov 25 11:41:05 2008
@@ -21,7 +21,7 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Comparator;
-import java.util.LinkedHashMap;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -175,7 +175,7 @@
     comparators.add( new ClassicDepthComparator() );
     comparators.add( new ClassicVersionComparator() );
     
-    Map<String, List<MetadataTreeNode>> buckets = new LinkedHashMap<String,
List<MetadataTreeNode>>(128);
+    Map<String, List<MetadataTreeNode>> buckets = new HashMap<String, List<MetadataTreeNode>>(128);
     DefaultSatSolver.fillBuckets( buckets, aa1 );
     DefaultSatSolver.sortBuckets( buckets, comparators );
 
@@ -342,8 +342,8 @@
     assertEquals( 3, res.size() );
     
     assertTrue( res.contains( a1 ) );
-    assertTrue( res.contains( b1 ) );
-    assertTrue( res.contains( c2 ) );
+    assertTrue( res.contains( b2 ) );
+    assertTrue( res.contains( c1 ) );
   }
   //----------------------------------------------------------------------
   //       b:b:1 - c:c:[2,4)
@@ -419,8 +419,8 @@
     assertEquals( 3, res.size() );
     
     assertTrue( res.contains( a1 ) );
-    assertTrue( res.contains( b1 ) );
-    assertTrue( res.contains( c2 ) );
+    assertTrue( res.contains( b2 ) );
+    assertTrue( res.contains( c1 ) );
   }
   //----------------------------------------------------------------------
   //       d:d:1 - c:c:[2,4)



Mime
View raw message