Github user geomacy commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/746#discussion_r127952482
--- Diff:
core/src/main/java/org/apache/brooklyn/core/typereg/BasicRegisteredType.java ---
@@ -153,4 +160,49 @@ public String toString() {
(getPlan()!=null ? ";"+getPlan().getPlanFormat() : "")+
"]";
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((aliases == null) ? 0 :
aliases.hashCode());
+ result = prime * result + ((bundles == null) ? 0 :
bundles.hashCode());
+ result = prime * result + ((containingBundle == null) ? 0 :
containingBundle.hashCode());
+ result = prime * result + (deprecated ? 1231 : 1237);
+ result = prime * result + ((description == null) ? 0 :
description.hashCode());
+ result = prime * result + (disabled ? 1231 : 1237);
+ result = prime * result + ((displayName == null) ? 0 :
displayName.hashCode());
+ result = prime * result + ((iconUrl == null) ? 0 :
iconUrl.hashCode());
+ result = prime * result + ((implementationPlan == null) ? 0 :
implementationPlan.hashCode());
+ result = prime * result + ((kind == null) ? 0 : kind.hashCode());
+ result = prime * result + ((superTypes == null) ? 0 :
superTypes.hashCode());
+ result = prime * result + ((symbolicName == null) ? 0 :
symbolicName.hashCode());
+ result = prime * result + ((tags == null) ? 0 : tags.hashCode());
+ result = prime * result + ((version == null) ? 0 :
version.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (obj == null) return false;
+ if (getClass() != obj.getClass()) return false;
+ BasicRegisteredType other = (BasicRegisteredType) obj;
+ if (!Objects.equal(aliases, other.aliases)) return false;
+ if (!Objects.equal(bundles, other.bundles)) return false;
+ if (!Objects.equal(containingBundle, other.containingBundle))
return false;
+ if (!Objects.equal(deprecated, other.deprecated)) return false;
--- End diff --
missing `if (!Objects.equal(description, other. description)) return false;`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---