diff options
author | Olivier Lamy <olamy@apache.org> | 2012-10-25 09:43:27 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-10-25 09:43:27 +0000 |
commit | 8146f7ea370f2d2010d331e2944e86f259d705ea (patch) | |
tree | 987bfcc79b0fccf9faa53efd57f8e2be0bfee842 /archiva-modules/archiva-base/archiva-proxy-common | |
parent | 5f42d3dcac2229031a1276c69fc0d34e8ae4dbf7 (diff) | |
download | archiva-8146f7ea370f2d2010d331e2944e86f259d705ea.tar.gz archiva-8146f7ea370f2d2010d331e2944e86f259d705ea.zip |
fix unit test
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1402054 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base/archiva-proxy-common')
-rw-r--r-- | archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/WagonFactoryRequest.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/WagonFactoryRequest.java b/archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/WagonFactoryRequest.java index ea6c5efa0..13ffce6d0 100644 --- a/archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/WagonFactoryRequest.java +++ b/archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/WagonFactoryRequest.java @@ -99,4 +99,38 @@ public class WagonFactoryRequest this.userAgent = userAgent; return this; } + + @Override + public boolean equals( Object o ) + { + if ( this == o ) + { + return true; + } + if ( !( o instanceof WagonFactoryRequest ) ) + { + return false; + } + + WagonFactoryRequest that = (WagonFactoryRequest) o; + + if ( protocol != null ? !protocol.equals( that.protocol ) : that.protocol != null ) + { + return false; + } + if ( userAgent != null ? !userAgent.equals( that.userAgent ) : that.userAgent != null ) + { + return false; + } + + return true; + } + + @Override + public int hashCode() + { + int result = protocol != null ? protocol.hashCode() : 0; + result = 31 * result + ( userAgent != null ? userAgent.hashCode() : 0 ); + return result; + } } |