mirror of https://github.com/apache/jclouds.git
Remove userMetadata from equals and hashCode
This caused test failures, regression from
a3376d4efe
.
This commit is contained in:
parent
68ff250c38
commit
3872b57483
|
@ -175,7 +175,8 @@ public class MutableResourceMetadataImpl<T extends Enum<T>> implements MutableRe
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(id, location, name, type, uri, userMetadata);
|
||||
// intentionally not hashing userMetadata
|
||||
return Objects.hashCode(id, location, name, type, uri);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -191,8 +192,8 @@ public class MutableResourceMetadataImpl<T extends Enum<T>> implements MutableRe
|
|||
&& Objects.equal(location, other.getLocation())
|
||||
&& Objects.equal(name, other.getName())
|
||||
&& Objects.equal(type, other.getType())
|
||||
&& Objects.equal(uri, other.getUri())
|
||||
&& Objects.equal(userMetadata, other.getUserMetadata());
|
||||
&& Objects.equal(uri, other.getUri());
|
||||
// intentionally not comparing userMetadata
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -114,13 +114,14 @@ public abstract class ResourceMetadataImpl<T extends Enum<T>> implements Resourc
|
|||
return false;
|
||||
ResourceMetadataImpl<?> that = ResourceMetadataImpl.class.cast(o);
|
||||
return equal(this.getType(), that.getType()) && equal(this.providerId, that.providerId)
|
||||
&& equal(this.name, that.name) && equal(this.location, that.location) && equal(this.uri, that.uri)
|
||||
&& equal(this.userMetadata, that.userMetadata);
|
||||
&& equal(this.name, that.name) && equal(this.location, that.location) && equal(this.uri, that.uri);
|
||||
// intentionally not comparing userMetadata
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(getType(), providerId, name, location, uri, userMetadata);
|
||||
return Objects.hashCode(getType(), providerId, name, location, uri);
|
||||
// intentionally not hashing userMetadata
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue