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(); } ]]>