git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163128 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2004-09-21 10:57:57 +00:00
parent 318f91c3f4
commit 425d44a54b
1 changed files with 18 additions and 27 deletions

View File

@ -791,6 +791,15 @@
</field>
</fields>
<codeSegments>
<codeSegment>
<version>3.0.0+</version>
<code>
public String toString()
{
return groupId + "/" + type + "s:" + artifactId + "-" + version;
}
</code>
</codeSegment>
<codeSegment>
<version>4.0.0</version>
<code>
@ -798,11 +807,6 @@
{
return groupId + ":" + artifactId + ":" + type + ":" + version;
}
public String toString()
{
return groupId + "/" + type + "s:" + artifactId + "-" + version;
}
</code>
</codeSegment>
<codeSegment>
@ -848,37 +852,24 @@
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();
}
}
]]></code>
</codeSegment>
</codeSegments>