eolivelli commented on a change in pull request #12401:
URL: https://github.com/apache/pulsar/pull/12401#discussion_r797329606



##########
File path: 
pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/stats/NonPersistentTopicStatsImpl.java
##########
@@ -57,7 +62,11 @@
 
     @JsonProperty("publishers")
     public List<NonPersistentPublisherStats> getNonPersistentPublishers() {
-        return (List<NonPersistentPublisherStats>) nonPersistentPublishers;
+        return Stream.concat(nonPersistentPublishers.stream()
+                                
.sorted(Comparator.comparing(NonPersistentPublisherStats::getProducerName)),

Review comment:
       sorting here may be a problem for users.
   because users will tend to think that this list is always sorted by 
producerName, but there is documentation about this, and stuff like this tend 
to break in future refactors.
   
   do you really need this list to be sorted ?




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


Reply via email to