diff --git a/parser/src/main/java/org/dna/mqtt/moquette/messaging/spi/impl/SubscriptionsStore.java b/parser/src/main/java/org/dna/mqtt/moquette/messaging/spi/impl/SubscriptionsStore.java index 2c8da612..72e5c25b 100644 --- a/parser/src/main/java/org/dna/mqtt/moquette/messaging/spi/impl/SubscriptionsStore.java +++ b/parser/src/main/java/org/dna/mqtt/moquette/messaging/spi/impl/SubscriptionsStore.java @@ -219,30 +219,6 @@ public class SubscriptionsStore { } protected void addDirect(Subscription newSubscription) { -// List tokens = new ArrayList(); -// try { -// tokens = splitTopic(newSubscription.topic); -// } catch (ParseException ex) { -// //TODO handle the parse exception -// LOG.error(null, ex); -//// return; -// } -// -// TreeNode current = subscriptions; -// for (Token token : tokens) { -// TreeNode matchingChildren; -// -// //check if a children with the same token already exists -// if ((matchingChildren = current.childWithToken(token)) != null) { -// current = matchingChildren; -// } else { -// //create a new node for the newly inserted token -// matchingChildren = new TreeNode(current); -// matchingChildren.setToken(token); -// current.addChild(matchingChildren); -// current = matchingChildren; -// } -// } TreeNode current = findMatchingNode(newSubscription.topic); current.addSubcription(newSubscription); }