From 40e3a99694badc0dddad2ddf900c17979c299dfd Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Fri, 12 Feb 2016 18:46:46 +0100 Subject: Fix eclipse warnings Reduce visibility of implementation class, add SafeVargars, make methods sstatic. Change-Id: I56c81371fad39b527d1423508537de59bd171e5b Signed-off-by: Robert Varga --- .../main/java/io/fd/honeycomb/vbd/impl/BridgeDomain.java | 6 +++--- .../main/java/io/fd/honeycomb/vbd/impl/VppModifier.java | 14 ++++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'vbd/impl/src') diff --git a/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/BridgeDomain.java b/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/BridgeDomain.java index 915e1b431..02c5d89ed 100644 --- a/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/BridgeDomain.java +++ b/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/BridgeDomain.java @@ -295,7 +295,7 @@ final class BridgeDomain implements DataTreeChangeListener { wTx.submit(); } - private Link prepareLinkData(final NodeId newVpp, final NodeId oldVpp, final LinkId linkId, + private static Link prepareLinkData(final NodeId newVpp, final NodeId oldVpp, final LinkId linkId, final int srcVxlanTunnelId, final int dstVxlanTunnelId) { final LinkBuilder linkBuilder = new LinkBuilder(); linkBuilder.setLinkId(linkId); @@ -332,9 +332,9 @@ final class BridgeDomain implements DataTreeChangeListener { } private void addSupportingBridgeDomain(final ListenableFuture addVppToBridgeDomainFuture, final Node node) { - Futures.addCallback(addVppToBridgeDomainFuture, new FutureCallback() { + Futures.addCallback(addVppToBridgeDomainFuture, new FutureCallback() { @Override - public void onSuccess(Object result) { + public void onSuccess(Void result) { LOG.debug("Storing bridge member to operational DS...."); final BridgeMemberBuilder bridgeMemberBuilder = new BridgeMemberBuilder(); bridgeMemberBuilder.setSupportingBridgeDomain(new ExternalReference(iiBridgeDomainOnVPPRest)); diff --git a/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VppModifier.java b/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VppModifier.java index 00cd3012b..c23f0f6ef 100644 --- a/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VppModifier.java +++ b/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VppModifier.java @@ -59,7 +59,7 @@ import org.slf4j.LoggerFactory; /** * Class which is used for manipulation with VPP */ -public class VppModifier { +final class VppModifier { private static final Long DEFAULT_ENCAP_VRF_ID = 0L; private static final Logger LOG = LoggerFactory.getLogger(BridgeDomain.class); @@ -69,21 +69,23 @@ public class VppModifier { private final InstanceIdentifier iiBridgeDomainOnVPP; - public VppModifier(final MountPointService mountService, final String bridgeDomainName) { + VppModifier(final MountPointService mountService, final String bridgeDomainName) { this.mountService = mountService; this.bridgeDomainName = bridgeDomainName; this.iiBridgeDomainOnVPP = InstanceIdentifier.create(Vpp.class) .child(BridgeDomains.class) .child(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.bridge.domains.BridgeDomain.class, new BridgeDomainKey(bridgeDomainName)); } + /** * Tryies to read ipv4 addresses from all specified {@code iiToVpps } vpps. * * @param iiToVpps collection of instance identifiers which points to concrete mount points. * @return future which contains list of ip addreases in the same order as was specified in {@code iiToVpps} */ - ListenableFuture>> readIpAddressesFromVpps(final KeyedInstanceIdentifier... iiToVpps) { - final List>> ipv4Futures = new ArrayList<>(); + @SafeVarargs + final ListenableFuture>> readIpAddressesFromVpps(final KeyedInstanceIdentifier... iiToVpps) { + final List>> ipv4Futures = new ArrayList<>(iiToVpps.length); for (final KeyedInstanceIdentifier iiToVpp : iiToVpps) { ipv4Futures.add(readIpAddressFromVpp(iiToVpp)); } @@ -166,7 +168,7 @@ public class VppModifier { @Override public void onFailure(Throwable t) { - LOG.debug("Writing super virtual interface to {} failed.", iiToVpp.getKey().getNodeId()); + LOG.debug("Writing super virtual interface to {} failed.", iiToVpp.getKey().getNodeId(), t); } }); } else { @@ -174,7 +176,7 @@ public class VppModifier { } } - private Interface prepareVirtualInterfaceData(final Vxlan vxlan, Integer vxlanTunnelId) { + private static Interface prepareVirtualInterfaceData(final Vxlan vxlan, Integer vxlanTunnelId) { final InterfaceBuilder interfaceBuilder = new InterfaceBuilder(); //TODO implement tunnel counter interfaceBuilder.setName(VbdUtil.provideVxlanId(vxlanTunnelId)); -- cgit 1.2.3-korg