From 425d44a54b0c82e0a3c3d5ad98af9e649194ab13 Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Tue, 21 Sep 2004 10:57:57 +0000 Subject: [PATCH] clean up git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163128 13f79535-47bb-0310-9956-ffa450edef68 --- maven-model/maven.mdo | 45 +++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/maven-model/maven.mdo b/maven-model/maven.mdo index 8f1679bd17..d6fc57e87b 100644 --- a/maven-model/maven.mdo +++ b/maven-model/maven.mdo @@ -791,6 +791,15 @@ + + 3.0.0+ + + public String toString() + { + return groupId + "/" + type + "s:" + artifactId + "-" + version; + } + + 4.0.0 @@ -798,11 +807,6 @@ { return groupId + ":" + artifactId + ":" + type + ":" + version; } - - public String toString() - { - return groupId + "/" + type + "s:" + artifactId + "-" + version; - } @@ -848,36 +852,23 @@ public boolean equals( Object o ) { - if ( o == null ) + if ( this == o ) + { + return true; + } + + if ( !( o instanceof Dependency ) ) { return false; } - if ( getClass() != o.getClass() ) - { - return false; - } - - if ( getId() != null ) - { - return getId().equals( ( (Dependency) o ).getId() ); - } - else - { - return ( (Dependency) o ).getId() == null; - } + Dependency d = (Dependency) o; + return getId().equals( d.getId() ); } public int hashCode() { - if ( getId() != null ) - { - return getId().hashCode(); - } - else - { - return super.hashCode(); - } + return getId().hashCode(); } ]]>