diff --git a/activemq-partition/src/main/java/org/apache/activemq/partition/PartitionBroker.java b/activemq-partition/src/main/java/org/apache/activemq/partition/PartitionBroker.java index 7c6d169bfd..9362e64b26 100644 --- a/activemq-partition/src/main/java/org/apache/activemq/partition/PartitionBroker.java +++ b/activemq-partition/src/main/java/org/apache/activemq/partition/PartitionBroker.java @@ -248,12 +248,13 @@ public class PartitionBroker extends BrokerFilter { } // The target with largest score wins.. - if( !targetScores.isEmpty() ) { + if (!targetScores.isEmpty()) { Target bestTarget = null; - int bestScore=0; + int bestScore = 0; for (Map.Entry entry : targetScores.entrySet()) { - if( entry.getValue().value > bestScore ) { + if (entry.getValue().value > bestScore) { bestTarget = entry.getKey(); + bestScore = entry.getValue().value; } } return bestTarget;