o Simplfied code (no need to check derived and immutable fields)

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@809322 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-08-30 12:13:52 +00:00
parent eb83c67035
commit 0234dc7e0e
1 changed files with 4 additions and 14 deletions

View File

@ -133,13 +133,8 @@ public class ScopeArtifactFilter
public int hashCode()
{
int hash = 17;
hash = hash * 31 + ( compileScope ? 1 : 0 );
hash = hash * 31 + ( runtimeScope ? 1 : 0 );
hash = hash * 31 + ( testScope ? 1 : 0 );
hash = hash * 31 + ( providedScope ? 1 : 0 );
hash = hash * 31 + ( systemScope ? 1 : 0 );
hash = hash * 31 + ( scope != null ? scope.hashCode() : 0);
hash = hash * 31 + ( scope != null ? scope.hashCode() : 0 );
return hash;
}
@ -159,12 +154,7 @@ public class ScopeArtifactFilter
ScopeArtifactFilter other = (ScopeArtifactFilter) obj;
return compileScope == other.compileScope
&& runtimeScope == other.runtimeScope
&& testScope == other.testScope
&& providedScope == other.providedScope
&& systemScope == other.systemScope
&& equals( scope, other.scope );
return equals( scope, other.scope );
}
private static boolean equals( String str1, String str2 )