Skip to content

Commit 9e011ee

Browse files
committed
fix: Made the equals method more safe for NPEs in case of unresolvable typeReferences.
1 parent 3793342 commit 9e011ee

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • code-generation/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/model/terms

code-generation/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/model/terms/DefaultVariableLiteral.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public boolean equals(Object o) {
9898
DefaultVariableLiteral that = (DefaultVariableLiteral) o;
9999
return Objects.equals(index, that.index)
100100
&& name.equals(that.name)
101-
&& typeReference.equals(that.typeReference)
101+
&& (typeReference != null) ? typeReference.equals(that.typeReference) : that.typeReference == null
102102
&& Objects.equals(args, that.args)
103103
&& Objects.equals(child, that.child);
104104
}

0 commit comments

Comments
 (0)