PeppaO commented on code in PR #7069:
URL: https://github.com/apache/incubator-seata/pull/7069#discussion_r1895505110


##########
server/src/main/java/org/apache/seata/server/cluster/raft/RaftStateMachine.java:
##########
@@ -366,7 +366,7 @@ public RaftClusterMetadata 
changeOrInitRaftClusterMetadata() {
                     Integer.parseInt(
                         
((Environment)ObjectHolder.INSTANCE.getObject(OBJECT_KEY_SPRING_CONFIGURABLE_ENVIRONMENT))
                             .getProperty("server.port", String.valueOf(7091))),
-                    group, Collections.emptyMap());
+                    group, new HashMap<>());

Review Comment:
   因为Collections.emptyMap()返回的集合使用了final修饰,导致我进行put操作时,报错,unsupoort...



##########
server/src/main/java/org/apache/seata/server/cluster/raft/RaftStateMachine.java:
##########
@@ -406,7 +406,7 @@ private void syncCurrentNodeInfo(PeerId leaderPeerId) {
                     Integer.parseInt(
                         
((Environment)ObjectHolder.INSTANCE.getObject(OBJECT_KEY_SPRING_CONFIGURABLE_ENVIRONMENT))
                             .getProperty("server.port", String.valueOf(7091))),
-                    group, Collections.emptyMap());
+                    group, new HashMap<>());

Review Comment:
   same



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to