maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rfscho...@apache.org
Subject svn commit: r1602604 - in /maven/release/trunk/maven-release-api: pom.xml src/main/java/org/apache/maven/shared/release/versions/MavenArtifactVersion.java src/test/java/org/apache/maven/shared/release/versions/MavenArtifactVersionTest.java
Date Sat, 14 Jun 2014 17:02:37 GMT
Author: rfscholte
Date: Sat Jun 14 17:02:36 2014
New Revision: 1602604

URL: http://svn.apache.org/r1602604
Log:
[MRELEASE-431] use same version for all org.apache.maven artifacts
Remove test, version parsing definitions seem to have changed between Maven versions

Removed:
    maven/release/trunk/maven-release-api/src/test/java/org/apache/maven/shared/release/versions/MavenArtifactVersionTest.java
Modified:
    maven/release/trunk/maven-release-api/pom.xml
    maven/release/trunk/maven-release-api/src/main/java/org/apache/maven/shared/release/versions/MavenArtifactVersion.java

Modified: maven/release/trunk/maven-release-api/pom.xml
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-api/pom.xml?rev=1602604&r1=1602603&r2=1602604&view=diff
==============================================================================
--- maven/release/trunk/maven-release-api/pom.xml (original)
+++ maven/release/trunk/maven-release-api/pom.xml Sat Jun 14 17:02:36 2014
@@ -37,7 +37,6 @@
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-artifact</artifactId>
-      <version>3.2.1</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.aether</groupId>

Modified: maven/release/trunk/maven-release-api/src/main/java/org/apache/maven/shared/release/versions/MavenArtifactVersion.java
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-api/src/main/java/org/apache/maven/shared/release/versions/MavenArtifactVersion.java?rev=1602604&r1=1602603&r2=1602604&view=diff
==============================================================================
--- maven/release/trunk/maven-release-api/src/main/java/org/apache/maven/shared/release/versions/MavenArtifactVersion.java
(original)
+++ maven/release/trunk/maven-release-api/src/main/java/org/apache/maven/shared/release/versions/MavenArtifactVersion.java
Sat Jun 14 17:02:36 2014
@@ -32,9 +32,16 @@ class MavenArtifactVersion
         this.version = new DefaultArtifactVersion( version );
     }
 
-    public int compareTo( ArtifactVersion o )
+    public int compareTo( Object o )
     {
-        return version.compareTo( o );
+        if ( o instanceof MavenArtifactVersion )
+        {
+            return version.compareTo( ( (MavenArtifactVersion) o ).version );
+        }
+        else
+        {
+            return version.compareTo( version );
+        }
     }
 
     public int getMajorVersion()
@@ -78,10 +85,25 @@ class MavenArtifactVersion
     {
         return this.version.hashCode();
     }
-
+    
     @Override
-    public boolean equals( Object obj )
+    public boolean equals( Object other )
     {
-        return this.version.equals( obj );
+        if ( this == other )
+        {
+            return true;
+        }
+        if ( other == null )
+        {
+            return false;
+        }
+
+        if ( other instanceof MavenArtifactVersion )
+        {
+            return version.equals( ( (MavenArtifactVersion) other ).version );
+        }
+        return false;
     }
+
+    
 }



Mime
View raw message