Remove unneeded MERGE modification type 73/19773/4
authorRobert Varga <rovarga@cisco.com>
Thu, 7 May 2015 08:05:37 +0000 (10:05 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 7 May 2015 11:22:05 +0000 (11:22 +0000)
This modification type is never generated, so eliminate the todos and
warnings stemming from the use of deprecated value. Default statement
will still catch/warn about it.

Change-Id: I3eb26a14d50e3428b5c10c34f39d3d1e3ebb12d5
Signed-off-by: Robert Varga <rovarga@cisco.com>
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/EffectiveRibInWriter.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/LocRibWriter.java

index b8745cb6cec3aeffb63fcb391630c168e3bd9aff..fb2cf35b4578de9913e390c57494941eece49add 100644 (file)
@@ -83,9 +83,6 @@ final class EffectiveRibInWriter implements AutoCloseable {
             case DELETE:
                 // Delete has already been affected by the store in caller, so this is a no-op.
                 break;
-            case MERGE:
-                LOG.info("Merge on {} reported, this should never have happened, ignoring", route);
-                break;
             case UNMODIFIED:
                 // No-op
                 break;
@@ -140,9 +137,6 @@ final class EffectiveRibInWriter implements AutoCloseable {
                 case DELETE:
                     tx.delete(LogicalDatastoreType.OPERATIONAL, tablePath.node(child.getIdentifier()));
                     break;
-                case MERGE:
-                    LOG.info("Merge on {} reported, this should never have happened, ignoring", child);
-                    break;
                 case UNMODIFIED:
                     // No-op
                     break;
@@ -214,11 +208,6 @@ final class EffectiveRibInWriter implements AutoCloseable {
                     // delete the corresponding effective table
                     tx.delete(LogicalDatastoreType.OPERATIONAL, effectiveTablePath(peerKey, tableKey));
                     break;
-                case MERGE:
-                    // TODO: upstream API should never give us this, as it leaks how the delta was created.
-                    LOG.info("Merge on {} reported, this should never have happened, but attempting to cope", rootPath);
-                    modifyTable(tx, peerKey, tableKey, root);
-                    break;
                 case SUBTREE_MODIFIED:
                     modifyTable(tx, peerKey, tableKey, root);
                     break;
index 0b57184df312b27f86141d8fc8d90861ecf6c550..7b4a74801ff8b78efb4130df1ef00ffac97cd242 100644 (file)
@@ -93,7 +93,7 @@ final class LocRibWriter implements AutoCloseable, DOMDataTreeChangeListener {
         this.peerPolicyTracker.close();
     }
 
-    private AbstractRouteEntry createEntry(final PathArgument routeId) {
+    @Nonnull private AbstractRouteEntry createEntry(final PathArgument routeId) {
         final AbstractRouteEntry ret = this.ribSupport.isComplexRoute() ? new ComplexRouteEntry() : new SimpleRouteEntry();
 
         this.routeEntries.put(routeId, ret);