wang-jiahua commented on code in PR #10514:
URL: https://github.com/apache/rocketmq/pull/10514#discussion_r3410869931
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingContext.java:
##########
@@ -20,6 +20,8 @@
import java.util.List;
public class TopicQueueMappingContext {
+ public static final TopicQueueMappingContext EMPTY = new
TopicQueueMappingContext(null, null, null, null, null);
+
private String topic;
private Integer globalId;
private TopicQueueMappingDetail mappingDetail;
Review Comment:
`TopicQueueMappingContext` has only private fields with getters
(`getTopic()`, `getGlobalId()`, `getMappingDetail()`,
`getMappingDetailAndGlobal()`, `getConsumerGroupMapping()`). No public setters
exist. The constructor is the only way to set fields, and EMPTY is created with
all-null values. This pattern is consistent with `Collections.emptyList()` — an
immutable sentinel.
--
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]