Skip to content

Commit

Permalink
errorprone :: UseEnumSwitch (#796)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-mlb committed May 29, 2024
1 parent 3d995fe commit 4e9178d
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/main/java/emissary/directory/DirectoryObserverManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,16 @@ protected void placeUpdate(final Action action, final String placeKey) {
if (KeyManipulator.gmatch(placeKey, p.getPattern())) {
matchcount++;
logger.debug("Match! Doing {} for {}", action, placeKey);
if (action == Action.PLACE_ADD) {
p.placeRegistered(this.directoryKey, placeKey);
} else if (action == Action.PLACE_REMOVE) {
p.placeDeregistered(this.directoryKey, placeKey);
} else if (action == Action.PLACE_COST_CHANGE) {
p.placeCostChanged(this.directoryKey, placeKey);
switch (action) {
case PLACE_ADD:
p.placeRegistered(this.directoryKey, placeKey);
break;
case PLACE_REMOVE:
p.placeDeregistered(this.directoryKey, placeKey);
break;
case PLACE_COST_CHANGE:
p.placeCostChanged(this.directoryKey, placeKey);
break;
}
} else {
logger.debug("No match for {} using pattern {}", placeKey, p.getPattern());
Expand Down

0 comments on commit 4e9178d

Please sign in to comment.