Github user aledsage commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/612#discussion_r108629620
--- Diff:
core/src/main/java/org/apache/brooklyn/core/mgmt/BrooklynTags.java ---
@@ -59,6 +59,21 @@ public String getKind() {
public String getContents() {
return contents;
}
+
+ @Override
+ public boolean equals(Object other) {
+ if (other == null || !(other instanceof NamedStringTag)) {
+ return false;
+ }
+
+ return kind != null &&
kind.equals(((NamedStringTag)other).kind)
+ && contents != null &&
contents.equals(((NamedStringTag)other).contents);
+ }
+
+ @Override
+ public int hashCode() {
+ return (kind == null ? 0 : kind.hashCode()) + (contents ==
null ? 0 : contents.hashCode());
--- End diff --
Personal preference is to use guava's utilities: `Objects.hashCode(kind,
contents)`
---
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.
---