broker/TreeNode: code formatter used
This commit is contained in:
@@ -13,10 +13,10 @@
|
||||
*
|
||||
* You may elect to redistribute this code under either of these licenses.
|
||||
*/
|
||||
|
||||
package io.moquette.spi.impl.subscriptions;
|
||||
|
||||
import io.moquette.spi.ISessionsStore.ClientTopicCouple;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
|
||||
@@ -47,9 +47,8 @@ class TreeNode {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a shallow copy of the current node.
|
||||
* Copy the token and the children.
|
||||
* */
|
||||
* Creates a shallow copy of the current node. Copy the token and the children.
|
||||
*/
|
||||
TreeNode copy() {
|
||||
final TreeNode copy = new TreeNode();
|
||||
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
|
||||
* null;
|
||||
* Search for children that has the specified token, if not found return null;
|
||||
*/
|
||||
TreeNode childWithToken(Token token) {
|
||||
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.
|
||||
* */
|
||||
*/
|
||||
TreeNode removeClientSubscriptions(String clientID) {
|
||||
// collect what to delete and then delete to avoid ConcurrentModification
|
||||
TreeNode newSubRoot = this.copy();
|
||||
|
||||
Reference in New Issue
Block a user