Remove unused method parameters 89/11589/1
authorMarek Gradzki <[email protected]>
Mon, 9 Apr 2018 05:13:24 +0000 (07:13 +0200)
committerMarek Gradzki <[email protected]>
Mon, 9 Apr 2018 05:27:06 +0000 (05:27 +0000)
Change-Id: Ib6bb2b3378c9bb883bfa9bd1348813f7845b6b59
Signed-off-by: Marek Gradzki <[email protected]>
ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/config/IoamTraceWriterCustomizer.java
l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizer.java
lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java
nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizer.java
routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/trait/Ipv4RoutePathParser.java
routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/trait/Ipv6RoutePathParser.java
v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterfaceCustomizer.java
vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifySessionReader.java
vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java
vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/VppNodeReader.java

index af9e5da..a04ef33 100755 (executable)
@@ -68,7 +68,7 @@ public class IoamTraceWriterCustomizer extends FutureJVppIoamtraceCustomizer
                                         @Nonnull final TraceConfig dataAfter,
                                         @Nonnull final WriteContext ctx) throws WriteFailedException {
         try {
-            deleteTraceConfig(dataBefore, id);
+            deleteTraceConfig(id);
             addTraceConfig(dataAfter, id);
         } catch (Exception exUpdate) {
             LOG.error("Update Trace Configuration failed", exUpdate);
@@ -83,7 +83,7 @@ public class IoamTraceWriterCustomizer extends FutureJVppIoamtraceCustomizer
                                         @Nonnull final TraceConfig dataBefore,
                                         @Nonnull final WriteContext ctx) throws WriteFailedException {
         try {
-            deleteTraceConfig(dataBefore, id);
+            deleteTraceConfig(id);
         } catch (Exception exDelete) {
             LOG.error("Delete Trace Configuration failed", exDelete);
             throw new WriteFailedException.DeleteFailedException(id, exDelete);
@@ -109,13 +109,13 @@ public class IoamTraceWriterCustomizer extends FutureJVppIoamtraceCustomizer
         return reply;
     }
 
-    public TraceProfileDelReply deleteTraceConfig(TraceConfig dataBefore,
-                                                  final InstanceIdentifier<TraceConfig> id) throws WriteFailedException {
+    public TraceProfileDelReply deleteTraceConfig(final InstanceIdentifier<TraceConfig> id)
+        throws WriteFailedException {
         TraceProfileDel del = new TraceProfileDel();
 
         /* Write to VPP */
-        TraceProfileDelReply reply = getReplyForWrite((getFutureJVppIoamtrace().
-                                                      traceProfileDel(del).toCompletableFuture()), id);
+        TraceProfileDelReply reply = getReplyForWrite(getFutureJVppIoamtrace().traceProfileDel(del)
+            .toCompletableFuture(), id);
 
         return reply;
     }
index b66877f..e747736 100644 (file)
@@ -59,7 +59,7 @@ public class Ipv4AddressCustomizer extends FutureJVppCustomizer
         final String interfaceName = id.firstKeyOf(Interface.class).getName();
         final int interfaceIndex = interfaceContext.getIndex(interfaceName, writeContext.getMappingContext());
         // TODO - HC2VPP-92 - Add more descriptive exception handling after https://jira.fd.io/browse/VPP-649
-        setAddress(true, id, interfaceName, interfaceIndex, dataAfter, writeContext);
+        setAddress(true, id, interfaceName, interfaceIndex, dataAfter);
     }
 
     @Override
@@ -69,12 +69,11 @@ public class Ipv4AddressCustomizer extends FutureJVppCustomizer
         final String interfaceName = id.firstKeyOf(Interface.class).getName();
         final int interfaceIndex = interfaceContext.getIndex(interfaceName, writeContext.getMappingContext());
 
-        setAddress(false, id, interfaceName, interfaceIndex, dataBefore, writeContext);
+        setAddress(false, id, interfaceName, interfaceIndex, dataBefore);
     }
 
     private void setAddress(boolean add, final InstanceIdentifier<Address> id, final String interfaceName,
-                            final int interfaceIndex, final Address address,
-                            final WriteContext writeContext) throws WriteFailedException {
+                            final int interfaceIndex, final Address address) throws WriteFailedException {
 
         Subnet subnet = address.getSubnet();
 
index 25626b0..90d4e0e 100755 (executable)
@@ -180,7 +180,7 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
         builder.setTtl(resolveTtl(details.ttl));
         builder.setAuthoritative(
                 new RemoteMapping.Authoritative(byteToBoolean(details.authoritative)));
-        resolveMappings(id, builder, details, ctx.getModificationCache(), ctx.getMappingContext());
+        resolveMappings(builder, details, ctx.getModificationCache(), ctx.getMappingContext());
     }
 
     @Override
@@ -229,7 +229,7 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
         ((RemoteMappingsBuilder) builder).setRemoteMapping(readData);
     }
 
-    private void resolveMappings(final InstanceIdentifier id, final RemoteMappingBuilder builder,
+    private void resolveMappings(final RemoteMappingBuilder builder,
                                  final OneEidTableDetails details,
                                  final ModificationCache cache,
                                  final MappingContext mappingContext) throws ReadFailedException {
index 3fa3977..3e70ec6 100755 (executable)
@@ -68,7 +68,7 @@ public class NshEntryWriterCustomizer extends FutureJVppNshCustomizer
             throws WriteFailedException {
         LOG.debug("Creating nsh entry: iid={} dataAfter={}", id, dataAfter);
         final int newEntryIndex =
-                nshAddDelEntry(true, id, dataAfter, ~0 /* value not present */, writeContext.getMappingContext());
+                nshAddDelEntry(true, id, dataAfter);
         // Add nsh entry name <-> vpp index mapping to the naming context:
         nshEntryContext.addName(newEntryIndex, dataAfter.getName(), writeContext.getMappingContext());
         LOG.debug("Successfully created nsh entry(id={]): iid={} dataAfter={}", newEntryIndex, id, dataAfter);
@@ -84,7 +84,7 @@ public class NshEntryWriterCustomizer extends FutureJVppNshCustomizer
                 "Removing nsh entry {}, but index could not be found in the nsh entry context", entryName);
 
         final int entryIndex = nshEntryContext.getIndex(entryName, writeContext.getMappingContext());
-        nshAddDelEntry(false, id, dataBefore, entryIndex, writeContext.getMappingContext());
+        nshAddDelEntry(false, id, dataBefore);
 
         // Remove deleted interface from interface context:
         nshEntryContext.removeName(dataBefore.getName(), writeContext.getMappingContext());
@@ -92,10 +92,10 @@ public class NshEntryWriterCustomizer extends FutureJVppNshCustomizer
     }
 
     private int nshAddDelEntry(final boolean isAdd, @Nonnull final InstanceIdentifier<NshEntry> id,
-                               @Nonnull final NshEntry entry, final int entryId, final MappingContext ctx)
+                               @Nonnull final NshEntry entry)
             throws WriteFailedException {
         final CompletionStage<NshAddDelEntryReply> createNshEntryReplyCompletionStage =
-                getFutureJVppNsh().nshAddDelEntry(getNshAddDelEntryRequest(isAdd, entryId, entry, ctx));
+                getFutureJVppNsh().nshAddDelEntry(getNshAddDelEntryRequest(isAdd, entry));
 
         final NshAddDelEntryReply reply =
                 getReplyForWrite(createNshEntryReplyCompletionStage.toCompletableFuture(), id);
@@ -145,9 +145,7 @@ public class NshEntryWriterCustomizer extends FutureJVppNshCustomizer
         request.tlvLength = cur_len;
     }
 
-    private NshAddDelEntry getNshAddDelEntryRequest(final boolean isAdd, final int entryIndex,
-                                                    @Nonnull final NshEntry entry,
-                                                    @Nonnull final MappingContext ctx) {
+    private NshAddDelEntry getNshAddDelEntryRequest(final boolean isAdd, @Nonnull final NshEntry entry) {
         final NshAddDelEntry request = new NshAddDelEntry();
         request.isAdd = booleanToByte(isAdd);
 
index 31d3714..6f189af 100644 (file)
@@ -47,14 +47,14 @@ public interface Ipv4RoutePathParser extends RouteMapper {
                                         final Ipv4RouteNamesFactory namesFactory) {
         if (parsedHops.size() == 1) {
             final FibPath path = parsedHops.get(0);
-            if (RouteMapper.INSTANCE.isTableLookup(path)) return tableLookup(path);
+            if (RouteMapper.INSTANCE.isTableLookup(path)) return tableLookup();
             if (RouteMapper.INSTANCE.isSpecialHop(path)) return specialHop(path);
             return simpleHop(path, interfaceContext, mappingContext);
         }
         return hopList(routeName, parsedHops, interfaceContext, routeHopContext, mappingContext, namesFactory);
     }
 
-    static NextHopOptions tableLookup(final FibPath fibPath) {
+    static NextHopOptions tableLookup() {
         return new TableLookupBuilder()
                 .setTableLookupParams(
                         new TableLookupParamsBuilder()
index 280a515..1c7243c 100644 (file)
@@ -47,14 +47,14 @@ public interface Ipv6RoutePathParser extends RouteMapper {
                                         final Ipv6RouteNamesFactory namesFactory) {
         if (parsedHops.size() == 1) {
             final FibPath path = parsedHops.get(0);
-            if (RouteMapper.INSTANCE.isTableLookup(path)) return tableLookup(path);
+            if (RouteMapper.INSTANCE.isTableLookup(path)) return tableLookup();
             if (RouteMapper.INSTANCE.isSpecialHop(path)) return specialHop(path);
             return simpleHop(path, interfaceContext, mappingContext);
         }
         return hopList(routeName, parsedHops, interfaceContext, routeHopContext, mappingContext, namesFactory);
     }
 
-    static NextHopOptions tableLookup(final FibPath fibPath) {
+    static NextHopOptions tableLookup() {
         return new TableLookupBuilder()
                 .setTableLookupParams(
                         new TableLookupParamsBuilder()
index 10c8478..be50aa6 100644 (file)
@@ -62,7 +62,7 @@ public class InterfaceCustomizer extends FutureJVppCustomizer
                                         @Nonnull final Interface dataAfter,
                                         @Nonnull final WriteContext writeContext)
             throws WriteFailedException {
-        updateInterface(id, dataBefore, dataAfter, writeContext);
+        updateInterface(id, dataAfter, writeContext);
     }
 
     @Override
@@ -89,7 +89,6 @@ public class InterfaceCustomizer extends FutureJVppCustomizer
     }
 
     private void updateInterface(final InstanceIdentifier<Interface> id,
-                                 final Interface dataBefore,
                                  final Interface dataAfter, final WriteContext writeContext)
             throws WriteFailedException {
         LOG.debug("Updating interface:{} to: {}", id, dataAfter);
index 6e86a0a..813fd1b 100644 (file)
@@ -105,7 +105,7 @@ public class ClassifySessionReader extends FutureJVppCustomizer
         if (classifySession.isPresent()) {
             final ClassifySessionDetails detail = classifySession.get();
             final Optional<VppNode> node =
-                readVppNode(detail.tableId, detail.hitNextIndex, classifyTableContext, ctx.getMappingContext(), LOG);
+                readVppNode(detail.tableId, detail.hitNextIndex, classifyTableContext, ctx.getMappingContext());
             final StandardBuilder nextNode = new StandardBuilder();
             if (node.isPresent()) {
                 nextNode.setHitNext(node.get());
@@ -131,7 +131,7 @@ public class ClassifySessionReader extends FutureJVppCustomizer
         // TODO: HONEYCOMB-118 the approach might fail if the opaqueIndex contains small value that collides
         // with some of the adjacent nodes
 
-        final Optional<VppNode> node = readVppNode(tableIndex, opaqueIndex, classifyTableContext, ctx, LOG);
+        final Optional<VppNode> node = readVppNode(tableIndex, opaqueIndex, classifyTableContext, ctx);
         if (node.isPresent()) {
             return new OpaqueIndex(node.get());
         } else {
index 56727d2..509295c 100644 (file)
@@ -119,7 +119,7 @@ public class ClassifyTableReader extends FutureJVppCustomizer
         }
 
         final Optional<VppNode> node =
-            readVppNode(reply.tableId, reply.missNextIndex, classifyTableContext, ctx.getMappingContext(), LOG);
+            readVppNode(reply.tableId, reply.missNextIndex, classifyTableContext, ctx.getMappingContext());
         if (node.isPresent()) {
             builder.setMissNext(node.get());
         } else {
index 96dab88..4f30803 100644 (file)
@@ -35,7 +35,7 @@ interface VppNodeReader {
      */
     default Optional<VppNode> readVppNode(final int tableIndex, final int nodeIndex,
                                           @Nonnull final VppClassifierContextManager vppClassifierContextManager,
-                                          @Nonnull final MappingContext ctx, @Nonnull final Logger log) {
+                                          @Nonnull final MappingContext ctx) {
         final PacketHandlingAction action = PacketHandlingAction.forValue(nodeIndex);
         if (action == null) {
             return vppClassifierContextManager.getNodeName(tableIndex, nodeIndex, ctx)