explicit switch/case fallthroughs with a comment 16/85116/1
authorguillaume.lambert <guillaume.lambert@orange.com>
Tue, 15 Oct 2019 09:13:28 +0000 (11:13 +0200)
committerguillaume.lambert <guillaume.lambert@orange.com>
Tue, 15 Oct 2019 09:25:50 +0000 (11:25 +0200)
The maven checkstyle plugin allows to comment explicitly fallthrough in
switch/case structures so that they do not raise a warning.
https://checkstyle.sourceforge.io/apidocs/com/puppycrawl/tools/checkstyle/checks/coding/FallThroughCheck.html

Replace the @SuppressWarnings decorator by such a comment

Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I80f45d149eef2f234ec40044ee4c7f8193df646a

networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/NetConfTopologyListener.java

index d11d28695693394690a5786a564b2b916c830bbf..43100375db1f642b3970f9ae77210370afe921a7 100644 (file)
@@ -213,7 +213,6 @@ public class NetConfTopologyListener implements DataTreeChangeListener<Node> {
     }
 
     @Override
-    @SuppressWarnings("checkstyle:FallThrough")
     public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Node>> changes) {
         LOG.info("onDataTreeChanged");
         for (DataTreeModification<Node> change : changes) {
@@ -240,6 +239,7 @@ public class NetConfTopologyListener implements DataTreeChangeListener<Node> {
                 switch (rootNode.getModificationType()) {
                     case WRITE:
                         LOG.info("Node added: {}", nodeId);
+                    //fallthrough
                     case SUBTREE_MODIFIED:
                         NetconfNodeConnectionStatus.ConnectionStatus connectionStatus =
                                 netconfNode.getConnectionStatus();