From d1205a0a93dbaf18a35a4b9e9f828732d96f1d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20=C5=BBygie=C5=82o?= Date: Sun, 12 Dec 2021 13:10:05 +0100 Subject: [PATCH] Change interface implemented by MavenArtifactVersion --- .../versions/MavenArtifactVersion.java | 68 +------------------ 1 file changed, 3 insertions(+), 65 deletions(-) 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