You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2025/08/27 20:50:06 UTC
(plc4x) branch develop updated: fix: Made the equals method more safe for NPEs in case of unresolvable typeReferences.
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new 9e011eec31 fix: Made the equals method more safe for NPEs in case of unresolvable typeReferences.
9e011eec31 is described below
commit 9e011eec31707927bb1531ec11cdb838df6c104a
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed Aug 27 22:49:47 2025 +0200
fix: Made the equals method more safe for NPEs in case of unresolvable typeReferences.
---
.../language/mspec/model/terms/DefaultVariableLiteral.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code-generation/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/model/terms/DefaultVariableLiteral.java b/code-generation/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/model/terms/DefaultVariableLiteral.java
index d887fcbca3..971802cede 100644
--- a/code-generation/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/model/terms/DefaultVariableLiteral.java
+++ b/code-generation/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/model/terms/DefaultVariableLiteral.java
@@ -98,7 +98,7 @@ public class DefaultVariableLiteral implements VariableLiteral {
DefaultVariableLiteral that = (DefaultVariableLiteral) o;
return Objects.equals(index, that.index)
&& name.equals(that.name)
- && typeReference.equals(that.typeReference)
+ && (typeReference != null) ? typeReference.equals(that.typeReference) : that.typeReference == null
&& Objects.equals(args, that.args)
&& Objects.equals(child, that.child);
}