ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r1376743 - in /ant/ivy/core/trunk/src/java/org/apache/ivy: osgi/core/OsgiLatestStrategy.java plugins/latest/LatestRevisionStrategy.java plugins/version/LatestVersionMatcher.java
Date Thu, 23 Aug 2012 22:26:26 GMT
Author: maartenc
Date: Thu Aug 23 22:26:26 2012
New Revision: 1376743

URL: http://svn.apache.org/viewvc?rev=1376743&view=rev
Log:
Reverting some unwanted changes...

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/OsgiLatestStrategy.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/LatestRevisionStrategy.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/version/LatestVersionMatcher.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/OsgiLatestStrategy.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/OsgiLatestStrategy.java?rev=1376743&r1=1376742&r2=1376743&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/OsgiLatestStrategy.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/OsgiLatestStrategy.java Thu Aug 23
22:26:26 2012
@@ -72,9 +72,7 @@ public class OsgiLatestStrategy extends 
             ModuleRevisionId mrid1 = ModuleRevisionId.newInstance("", "", rev1);
             ModuleRevisionId mrid2 = ModuleRevisionId.newInstance("", "", rev2);
             
-            if (vmatcher.isDynamic(mrid1) && vmatcher.isDynamic(mrid2)) {
-                return vmatcher.compare(mrid1, mrid2, mridComparator);
-            } else if (vmatcher.isDynamic(mrid1)) {
+            if (vmatcher.isDynamic(mrid1)) {
                 int c = vmatcher.compare(mrid1, mrid2, mridComparator);
                 return c >= 0 ? 1 : -1;
             } else if (vmatcher.isDynamic(mrid2)) {

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/LatestRevisionStrategy.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/LatestRevisionStrategy.java?rev=1376743&r1=1376742&r2=1376743&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/LatestRevisionStrategy.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/LatestRevisionStrategy.java
Thu Aug 23 22:26:26 2012
@@ -109,9 +109,7 @@ public class LatestRevisionStrategy exte
             ModuleRevisionId mrid1 = ModuleRevisionId.newInstance("", "", rev1);
             ModuleRevisionId mrid2 = ModuleRevisionId.newInstance("", "", rev2);
 
-            if (vmatcher.isDynamic(mrid1) && vmatcher.isDynamic(mrid2)) {
-                return vmatcher.compare(mrid1, mrid2, mridComparator);
-            } else if (vmatcher.isDynamic(mrid1)) {
+            if (vmatcher.isDynamic(mrid1)) {
                 int c = vmatcher.compare(mrid1, mrid2, mridComparator);
                 return c >= 0 ? 1 : -1;
             } else if (vmatcher.isDynamic(mrid2)) {

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/version/LatestVersionMatcher.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/version/LatestVersionMatcher.java?rev=1376743&r1=1376742&r2=1376743&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/version/LatestVersionMatcher.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/version/LatestVersionMatcher.java Thu
Aug 23 22:26:26 2012
@@ -57,14 +57,6 @@ public class LatestVersionMatcher extend
      */
     public int compare(ModuleRevisionId askedMrid, ModuleRevisionId foundMrid,
             Comparator staticComparator) {
-        if (isDynamic(askedMrid) && !isDynamic(foundMrid)) {
-            return needModuleDescriptor(askedMrid, null) ? 0 : 1;
-        }
-        
-        String askedStatus = askedMrid.getRevision().substring("latest.".length());
-        String foundStatus = foundMrid.getRevision().substring("latest.".length());
-        
-        List statuses = StatusManager.getCurrent().getStatuses();
-        return statuses.indexOf(askedStatus) - statuses.indexOf(foundStatus);
+        return needModuleDescriptor(askedMrid, foundMrid) ? 0 : 1;
     }
 }



Mime
View raw message