broker/TreeNode: code formatter used

This commit is contained in:
Andreas Mager
2017-02-01 17:13:41 +01:00
parent 47101ca894
commit f85d45f796
@@ -13,10 +13,10 @@
* *
* You may elect to redistribute this code under either of these licenses. * You may elect to redistribute this code under either of these licenses.
*/ */
package io.moquette.spi.impl.subscriptions; package io.moquette.spi.impl.subscriptions;
import io.moquette.spi.ISessionsStore.ClientTopicCouple; import io.moquette.spi.ISessionsStore.ClientTopicCouple;
import java.util.*; import java.util.*;
import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.LinkedBlockingQueue;
@@ -47,9 +47,8 @@ class TreeNode {
} }
/** /**
* Creates a shallow copy of the current node. * Creates a shallow copy of the current node. Copy the token and the children.
* Copy the token and the children. */
* */
TreeNode copy() { TreeNode copy() {
final TreeNode copy = new TreeNode(); final TreeNode copy = new TreeNode();
copy.m_children = new ArrayList<>(m_children); copy.m_children = new ArrayList<>(m_children);
@@ -59,8 +58,7 @@ class TreeNode {
} }
/** /**
* Search for children that has the specified token, if not found return * Search for children that has the specified token, if not found return null;
* null;
*/ */
TreeNode childWithToken(Token token) { TreeNode childWithToken(Token token) {
for (TreeNode child : m_children) { for (TreeNode child : m_children) {
@@ -131,7 +129,7 @@ class TreeNode {
/** /**
* Create a copied subtree rooted on this node but purged of clientID's subscriptions. * Create a copied subtree rooted on this node but purged of clientID's subscriptions.
* */ */
TreeNode removeClientSubscriptions(String clientID) { TreeNode removeClientSubscriptions(String clientID) {
// collect what to delete and then delete to avoid ConcurrentModification // collect what to delete and then delete to avoid ConcurrentModification
TreeNode newSubRoot = this.copy(); TreeNode newSubRoot = this.copy();