You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2009/08/30 14:13:52 UTC
svn commit: r809322 -
/maven/components/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilter.java
Author: bentmann
Date: Sun Aug 30 12:13:52 2009
New Revision: 809322
URL: http://svn.apache.org/viewvc?rev=809322&view=rev
Log:
o Simplfied code (no need to check derived and immutable fields)
Modified:
maven/components/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilter.java
Modified: maven/components/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilter.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilter.java?rev=809322&r1=809321&r2=809322&view=diff
==============================================================================
--- maven/components/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilter.java (original)
+++ maven/components/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilter.java Sun Aug 30 12:13:52 2009
@@ -133,14 +133,9 @@
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 @@
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 )