xuesongxs commented on pull request #9999:
URL: https://github.com/apache/pulsar/pull/9999#issuecomment-809141810


   Log output is the cloned configuration.
   
   
   
   ***@***.***
    
   From: feynmanlin
   Date: 2021-03-26 23:24
   To: apache/pulsar
   CC: xuesongxs; Assign
   Subject: Re: [apache/pulsar] fix #9953 (#9999)
   @315157973 commented on this pull request.
   conf.clone() is a shallow copy. Modifying the Set in the cloned object will 
affect the original conf.
   So, I think the better way is to do a deep copy, such as:
   Set<String> clonedSet = new HashSet<>(cloneConf.getTopicNames());
   clonedSet.remove(topicName);
   
   —
   You are receiving this because you were assigned.
   Reply to this email directly, view it on GitHub, or unsubscribe.
   


-- 
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.

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


Reply via email to