diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2018-04-09 07:13:24 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2018-04-09 05:27:06 +0000 |
commit | 911b0eda3c744c6822134b088fd3da20e793cc0d (patch) | |
tree | 7051cce125d9f868ba496b18f72cdb494ceaa2ed | |
parent | 5365646dc85aad32b7be4918122ce6d8e6de2fe3 (diff) |
Remove unused method parameters
Change-Id: Ib6bb2b3378c9bb883bfa9bd1348813f7845b6b59
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
10 files changed, 25 insertions, 29 deletions
diff --git a/ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/config/IoamTraceWriterCustomizer.java b/ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/config/IoamTraceWriterCustomizer.java index af9e5dadd..a04ef33ab 100755 --- a/ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/config/IoamTraceWriterCustomizer.java +++ b/ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/config/IoamTraceWriterCustomizer.java @@ -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; } diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizer.java index b66877ff0..e7477361f 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizer.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizer.java @@ -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(); diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java index 25626b0f6..90d4e0ebb 100755 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java @@ -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 { diff --git a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizer.java b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizer.java index 3fa397705..3e70ec686 100755 --- a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizer.java +++ b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizer.java @@ -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); diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/trait/Ipv4RoutePathParser.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/trait/Ipv4RoutePathParser.java index 31d371497..6f189af13 100644 --- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/trait/Ipv4RoutePathParser.java +++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/trait/Ipv4RoutePathParser.java @@ -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() diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/trait/Ipv6RoutePathParser.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/trait/Ipv6RoutePathParser.java index 280a515e1..1c7243ce8 100644 --- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/trait/Ipv6RoutePathParser.java +++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/trait/Ipv6RoutePathParser.java @@ -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() diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterfaceCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterfaceCustomizer.java index 10c8478c4..be50aa6b7 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterfaceCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterfaceCustomizer.java @@ -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); diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifySessionReader.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifySessionReader.java index 6e86a0ada..813fd1b82 100644 --- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifySessionReader.java +++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifySessionReader.java @@ -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 { diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java index 56727d291..509295cb1 100644 --- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java +++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java @@ -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 { diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/VppNodeReader.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/VppNodeReader.java index 96dab88af..4f30803e6 100644 --- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/VppNodeReader.java +++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/VppNodeReader.java @@ -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) |