Committed by
Gerrit Code Review
SimpleMastershipStore: add missing switch-break
Change-Id: Iafe5cb42c53392466d23f348186074ca4fe674f6
Showing
1 changed file
with
8 additions
and
0 deletions
... | @@ -294,6 +294,7 @@ public class SimpleMastershipStore | ... | @@ -294,6 +294,7 @@ public class SimpleMastershipStore |
294 | return new MastershipEvent(MASTER_CHANGED, deviceId, | 294 | return new MastershipEvent(MASTER_CHANGED, deviceId, |
295 | getNodes(deviceId)); | 295 | getNodes(deviceId)); |
296 | } | 296 | } |
297 | + | ||
297 | case STANDBY: | 298 | case STANDBY: |
298 | case NONE: | 299 | case NONE: |
299 | boolean modified = addToBackup(deviceId, nodeId); | 300 | boolean modified = addToBackup(deviceId, nodeId); |
... | @@ -301,6 +302,8 @@ public class SimpleMastershipStore | ... | @@ -301,6 +302,8 @@ public class SimpleMastershipStore |
301 | return new MastershipEvent(BACKUPS_CHANGED, deviceId, | 302 | return new MastershipEvent(BACKUPS_CHANGED, deviceId, |
302 | getNodes(deviceId)); | 303 | getNodes(deviceId)); |
303 | } | 304 | } |
305 | + break; | ||
306 | + | ||
304 | default: | 307 | default: |
305 | log.warn("unknown Mastership Role {}", role); | 308 | log.warn("unknown Mastership Role {}", role); |
306 | } | 309 | } |
... | @@ -332,12 +335,17 @@ public class SimpleMastershipStore | ... | @@ -332,12 +335,17 @@ public class SimpleMastershipStore |
332 | incrementTerm(deviceId); | 335 | incrementTerm(deviceId); |
333 | return new MastershipEvent(MASTER_CHANGED, deviceId, | 336 | return new MastershipEvent(MASTER_CHANGED, deviceId, |
334 | getNodes(deviceId)); | 337 | getNodes(deviceId)); |
338 | + | ||
335 | case STANDBY: | 339 | case STANDBY: |
336 | if (removeFromBackups(deviceId, nodeId)) { | 340 | if (removeFromBackups(deviceId, nodeId)) { |
337 | return new MastershipEvent(BACKUPS_CHANGED, deviceId, | 341 | return new MastershipEvent(BACKUPS_CHANGED, deviceId, |
338 | getNodes(deviceId)); | 342 | getNodes(deviceId)); |
339 | } | 343 | } |
344 | + break; | ||
345 | + | ||
340 | case NONE: | 346 | case NONE: |
347 | + break; | ||
348 | + | ||
341 | default: | 349 | default: |
342 | log.warn("unknown Mastership Role {}", role); | 350 | log.warn("unknown Mastership Role {}", role); |
343 | } | 351 | } | ... | ... |
-
Please register or login to post a comment