From 4831157f509c043bb1faf579dd7e51b0e6439411 Mon Sep 17 00:00:00 2001 From: scwlkq Date: Tue, 20 Feb 2024 17:40:14 +0800 Subject: [PATCH] Move data.put inside null check in writeOffset method --- .../offsetmgmt/api/storage/OffsetStorageWriterImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/eventmesh-openconnect-offsetmgmt-api/src/main/java/org/apache/eventmesh/openconnect/offsetmgmt/api/storage/OffsetStorageWriterImpl.java b/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/eventmesh-openconnect-offsetmgmt-api/src/main/java/org/apache/eventmesh/openconnect/offsetmgmt/api/storage/OffsetStorageWriterImpl.java index 1252a039f5..462cbc0c4a 100644 --- a/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/eventmesh-openconnect-offsetmgmt-api/src/main/java/org/apache/eventmesh/openconnect/offsetmgmt/api/storage/OffsetStorageWriterImpl.java +++ b/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/eventmesh-openconnect-offsetmgmt-api/src/main/java/org/apache/eventmesh/openconnect/offsetmgmt/api/storage/OffsetStorageWriterImpl.java @@ -57,8 +57,8 @@ public void writeOffset(RecordPartition partition, RecordOffset offset) { ConnectorRecordPartition extendRecordPartition = null; if (partition != null && partition.getPartition() != null) { extendRecordPartition = new ConnectorRecordPartition(connectorName, partition.getPartition()); + data.put(extendRecordPartition, offset); } - data.put(extendRecordPartition, offset); } /**