Skip to content

Commit

Permalink
make var final
Browse files Browse the repository at this point in the history
  • Loading branch information
bohhyang committed Nov 4, 2024
1 parent c5801fb commit bbb1c20
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public class ZooKeeperAnnouncer implements D2ServiceDiscoveryEventHelper
/**
* The action to take when d2 weight breaches validation rules.
*/
private ActionOnWeightBreach _actionOnWeightBreach = ActionOnWeightBreach.IGNORE;
private final ActionOnWeightBreach _actionOnWeightBreach;

private final AtomicInteger _maxWeightBreachedCount = new AtomicInteger(0);
private final AtomicInteger _weightDecimalPlacesBreachedCount = new AtomicInteger(0);
Expand Down Expand Up @@ -267,10 +267,7 @@ public ZooKeeperAnnouncer(LoadBalancerServer server, boolean initialIsUp,
_eventEmitter = eventEmitter;

_maxWeight = maxWeight;
if (actionOnWeightBreach != null)
{
_actionOnWeightBreach = actionOnWeightBreach;
}
_actionOnWeightBreach = actionOnWeightBreach != null ? actionOnWeightBreach : ActionOnWeightBreach.IGNORE;

if (server instanceof ZooKeeperServer)
{
Expand Down

0 comments on commit bbb1c20

Please sign in to comment.