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> </field>
</fields> </fields>
<codeSegments> <codeSegments>
<codeSegment>
<version>3.0.0+</version>
<code>
public String toString()
{
return groupId + "/" + type + "s:" + artifactId + "-" + version;
}
</code>
</codeSegment>
<codeSegment> <codeSegment>
<version>4.0.0</version> <version>4.0.0</version>
<code> <code>
@ -798,11 +807,6 @@
{ {
return groupId + ":" + artifactId + ":" + type + ":" + version; return groupId + ":" + artifactId + ":" + type + ":" + version;
} }
public String toString()
{
return groupId + "/" + type + "s:" + artifactId + "-" + version;
}
</code> </code>
</codeSegment> </codeSegment>
<codeSegment> <codeSegment>
@ -848,37 +852,24 @@
public boolean equals( Object o ) public boolean equals( Object o )
{ {
if ( o == null ) if ( this == o )
{
return true;
}
if ( !( o instanceof Dependency ) )
{ {
return false; return false;
} }
if ( getClass() != o.getClass() ) Dependency d = (Dependency) o;
{ return getId().equals( d.getId() );
return false;
}
if ( getId() != null )
{
return getId().equals( ( (Dependency) o ).getId() );
}
else
{
return ( (Dependency) o ).getId() == null;
}
} }
public int hashCode() public int hashCode()
{
if ( getId() != null )
{ {
return getId().hashCode(); return getId().hashCode();
} }
else
{
return super.hashCode();
}
}
]]></code> ]]></code>
</codeSegment> </codeSegment>
</codeSegments> </codeSegments>