Compare using value equality instead of reference equality.
RELNOTES: None
@@ -699,7 +699,7 @@ public class RuleClass {
for (Attribute attribute : parent.getAttributes()) {
String attrName = attribute.getName();
Preconditions.checkArgument(
- !attributes.containsKey(attrName) || attributes.get(attrName) == attribute,
+ !attributes.containsKey(attrName) || attributes.get(attrName).equals(attribute),
"Attribute %s is inherited multiple times in %s ruleclass",
attrName,
name);
