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 2024/02/10 09:50:56 UTC

(plc4x) 02/03: fix: Fixed an issue with serializing PlcStructs

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch fix/enum-discriminators
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit e7d35278dc86ae437d015d8f28d0958d7a6abc0c
Author: Christofer Dutz <cd...@apache.org>
AuthorDate: Fri Feb 9 18:50:17 2024 +0100

    fix: Fixed an issue with serializing PlcStructs
---
 plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcStruct.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcStruct.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcStruct.java
index cb3393a5da..5b7469795d 100644
--- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcStruct.java
+++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcStruct.java
@@ -94,7 +94,7 @@ public class PlcStruct extends PlcValueAdapter {
                 throw new PlcRuntimeException("Error serializing. List item doesn't implement XmlSerializable");
             }
             ((Serializable) tagValue).serialize(writeBuffer);
-            writeBuffer.pushContext(tagName);
+            writeBuffer.popContext(tagName);
         }
         writeBuffer.popContext("PlcStruct");
     }