jbertram commented on code in PR #5719:
URL: https://github.com/apache/activemq-artemis/pull/5719#discussion_r2121949171


##########
artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSessionState.java:
##########
@@ -186,35 +186,39 @@ public void setAttached(boolean attached) {
 
    public Collection<MqttTopicSubscription> getSubscriptions() {
       Collection<MqttTopicSubscription> result = new HashSet<>();
-      for (Pair<MqttTopicSubscription, Integer> pair : subscriptions.values()) 
{
-         result.add(pair.getA());
+      for (SubscriptionItem item : subscriptions.values()) {
+         result.add(item.getSubscription());
       }
       return result;
    }
 
    public Collection<Pair<MqttTopicSubscription, Integer>> 
getSubscriptionsPlusID() {

Review Comment:
   I think this should just return `Map<String, 
MQTTSessionState.SubscriptionItem>`, e.g.:
   ```java
   public Map<String, SubscriptionItem> getSubscriptionsPlusID() {
      return new HashMap<>(subscriptions);
   }
   ```
   It should be simply to update any code which calls this function to deal 
with the new return value.



-- 
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: gitbox-unsubscr...@activemq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org
For additional commands, e-mail: gitbox-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to