diff --git a/maven-release-api/src/main/java/org/apache/maven/shared/release/versions/MavenArtifactVersion.java b/maven-release-api/src/main/java/org/apache/maven/shared/release/versions/MavenArtifactVersion.java index fe579cc9a..51bc3a71c 100644 --- a/maven-release-api/src/main/java/org/apache/maven/shared/release/versions/MavenArtifactVersion.java +++ b/maven-release-api/src/main/java/org/apache/maven/shared/release/versions/MavenArtifactVersion.java @@ -23,7 +23,7 @@ import org.apache.maven.artifact.versioning.DefaultArtifactVersion; class MavenArtifactVersion - implements ArtifactVersion + implements Comparable { private final ArtifactVersion version; @@ -32,71 +32,9 @@ class MavenArtifactVersion this.version = new DefaultArtifactVersion( version ); } - public int compareTo( Object o ) + public int compareTo( MavenArtifactVersion o ) { - if ( o instanceof MavenArtifactVersion ) - { - return version.compareTo( ( (MavenArtifactVersion) o ).version ); - } - else - { - return version.compareTo( version ); - } - } - - /** - *

getMajorVersion.

- * - * @return a int - */ - public int getMajorVersion() - { - return version.getMajorVersion(); - } - - /** - *

getMinorVersion.

- * - * @return a int - */ - public int getMinorVersion() - { - return version.getMinorVersion(); - } - - /** - *

getIncrementalVersion.

- * - * @return a int - */ - public int getIncrementalVersion() - { - return version.getIncrementalVersion(); - } - - /** - *

getBuildNumber.

- * - * @return a int - */ - public int getBuildNumber() - { - return version.getBuildNumber(); - } - - /** - *

getQualifier.

- * - * @return a {@link java.lang.String} object - */ - public String getQualifier() - { - return version.getQualifier(); - } - - public void parseVersion( String version ) - { - this.version.parseVersion( version ); + return version.compareTo( o.version ); } @Override