Switch to using spotbugs 97/81997/6
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 11 May 2019 07:20:34 +0000 (09:20 +0200)
committerFaseela K <faseela.k@ericsson.com>
Mon, 13 May 2019 05:55:40 +0000 (05:55 +0000)
findbugs is no longer declared in odlparent, resulting in a bunch
of maven warnings. Switch to using spotbugs instead, fixing up
violations it is detecting.

Change-Id: I99de6fe4609310bd444930ed919f3b6a0adc41f3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 files changed:
bgpmanager/impl/pom.xml
bgpmanager/impl/src/main/java/org/opendaylight/netvirt/bgpmanager/BgpConfigurationManager.java
bgpmanager/impl/src/main/java/org/opendaylight/netvirt/bgpmanager/oam/BgpAlarms.java
coe/impl/src/main/java/org/opendaylight/netvirt/coe/listeners/ClusterListener.java
commons/binding-parent/pom.xml
dhcpservice/impl/src/main/java/org/opendaylight/netvirt/dhcpservice/DhcpExternalTunnelManager.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/l2gw/jobs/DeleteL2GwDeviceMacsFromElanJob.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/l2gw/utils/ElanL2GatewayUtils.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/utils/ElanItmUtils.java
fibmanager/impl/src/main/java/org/opendaylight/netvirt/fibmanager/BaseVrfEntryHandler.java
fibmanager/impl/src/main/java/org/opendaylight/netvirt/fibmanager/NexthopManager.java
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/internal/RouterDpnChangeListener.java
neutronvpn/impl/src/main/java/org/opendaylight/netvirt/neutronvpn/NeutronvpnManager.java
sfc/classifier/impl/src/main/java/org/opendaylight/netvirt/sfc/classifier/service/domain/impl/ConfigurationClassifierImpl.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/InterfaceStateChangeListener.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/TunnelEndPointChangeListener.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnInterfaceManager.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnOpStatusListener.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/intervpnlink/IVpnLinkServiceImpl.java

index d25057a9f07c78bd6a81540959371327955fa633..e56f6d88f809dc7528740f4102b6d44d1661bcf7 100644 (file)
@@ -128,8 +128,8 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
                 </configuration>
             </plugin>
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>findbugs-maven-plugin</artifactId>
+                <groupId>com.github.spotbugs</groupId>
+                <artifactId>spotbugs-maven-plugin</artifactId>
                 <configuration>
                     <failOnError>true</failOnError>
                     <!--
index ab413b9ee8e4d3c82e1c6a1fde175bcd11f164c5..d0b16e121d656c458b4dad75104759575dd2fb90 100755 (executable)
@@ -2476,7 +2476,7 @@ public class BgpConfigurationManager {
         do {
             try {
                 br.sendEOR();
-                LOG.debug("Replay sendEOR {} successful");
+                LOG.debug("Replay sendEOR() successful");
                 break;
             } catch (Exception e) {
                 eorRetry.errorOccured();
index ddcd417ab57a019af8ee04b80534a45845a3cc99..f360ddab6bac284e70dc08f780ba4a014677e840 100644 (file)
@@ -99,7 +99,7 @@ public class BgpAlarms implements Runnable, AutoCloseable {
                     Integer.parseInt(nbrshipStatus);
                     alarmToRaise = false;
                 } catch (NumberFormatException e) {
-                    LOG.trace("Exception thrown in parsing the integers. {}", e);
+                    LOG.trace("Exception thrown in parsing the integers.", e);
                 }
 
                 final BgpAlarmStatus alarmStatus = neighborsRaisedAlarmStatusMap.get(nbr.getAddress().getValue());
index 12fb41c69f796f13e7e17532322398c464a2d109..274dd9bc4c5f1f6d9124f796152417e610afcae7 100644 (file)
@@ -55,7 +55,7 @@ public class ClusterListener extends AbstractSyncDataTreeChangeListener<K8sClust
     public void remove(@NonNull InstanceIdentifier<K8sClusters> instanceIdentifier, @NonNull K8sClusters clusters) {
         LOG.trace("K8 Cluster deleted {}", clusters);
         if (clusters.getClusterId() == null) {
-            LOG.error("K8 cluster {} deleted with null cluster-id");
+            LOG.error("K8 cluster {} deleted with null cluster-id", clusters);
             return;
         }
         jobCoordinator.enqueueJob(clusters.getClusterId().getValue(),
@@ -74,7 +74,7 @@ public class ClusterListener extends AbstractSyncDataTreeChangeListener<K8sClust
     public void add(@NonNull InstanceIdentifier<K8sClusters> instanceIdentifier, @NonNull K8sClusters clusters) {
         LOG.trace("K8 Cluster added {}", clusters);
         if (clusters.getClusterId() == null) {
-            LOG.error("K8 cluster {} added with null cluster-id");
+            LOG.error("K8 cluster {} added with null cluster-id", clusters);
             return;
         }
         jobCoordinator.enqueueJob(clusters.getClusterId().getValue(),
index 251005093152be0087b45380b45eab5f7b8f029b..fbb64463c4f3a5b750f0bc0913d01924e4afa2ef 100644 (file)
@@ -121,16 +121,9 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
         </configuration>
       </plugin>
       <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>findbugs-maven-plugin</artifactId>
+        <groupId>com.github.spotbugs</groupId>
+        <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
-          <plugins>
-            <plugin>
-              <groupId>jp.skypencil.findbugs.slf4j</groupId>
-              <artifactId>bug-pattern</artifactId>
-              <version>1.4.0</version>
-            </plugin>
-          </plugins>
           <failOnError>true</failOnError>
         </configuration>
       </plugin>
index 504a64291662ff3679b5383bbb40da52f61c5555..fc4ad19153f02f443fb9eb546b2dad7c09bcded3 100644 (file)
@@ -328,12 +328,12 @@ public class DhcpExternalTunnelManager implements IDhcpExternalTunnelManager {
         // During controller restart we'll get add for designatedDpns as well and we
         // need not install drop flows for those dpns
         if (designatedDpnsToTunnelIpElanNameCache.get(dpId) != null) {
-            LOG.trace("The dpn {} is designated DPN need not install drop flows");
+            LOG.trace("The dpn {} is designated DPN need not install drop flows", dpId);
             return;
         }
         // Read from DS since the cache may not get loaded completely in restart scenario
         if (isDpnDesignatedDpn(dpId)) {
-            LOG.trace("The dpn {} is designated DPN need not install drop flows");
+            LOG.trace("The dpn {} is designated DPN need not install drop flows", dpId);
             return;
         }
         List<String> vmMacs = getAllVmMacs();
index c1637e39d3e8442412353c76aae2bd27d724a3b8..702a33e109509f3b0a2491f29a0ab5970c813be1 100644 (file)
@@ -13,10 +13,10 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
+import java.util.Locale;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ConcurrentMap;
 import java.util.stream.Collectors;
-
 import org.opendaylight.genius.utils.batching.ResourceBatchingManager;
 import org.opendaylight.genius.utils.batching.ResourceBatchingManager.ShardResource;
 import org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundUtils;
@@ -90,8 +90,7 @@ public class DeleteL2GwDeviceMacsFromElanJob implements Callable<List<Listenable
                 this.l2GwDevice.getHwvtepNodeId(), this.elanName);
         final String logicalSwitchName = ElanL2GatewayUtils.getLogicalSwitchFromElan(this.elanName);
         List<MacAddress> macs = new ArrayList<>();
-        macAddresses.forEach((mac) -> macs.add(new MacAddress(mac.getValue().toLowerCase())));
-
+        macAddresses.forEach((mac) -> macs.add(new MacAddress(mac.getValue().toLowerCase(Locale.ENGLISH))));
 
         List<ListenableFuture<Void>> futures = new ArrayList<>();
         ConcurrentMap<String, L2GatewayDevice> elanL2GwDevices = ElanL2GwCacheUtils
index 0f37884d86aad04bb637fa72901598f14287f77b..689a7c86e9ee9e7f20b7dbdd79fc8f2155484964 100644 (file)
@@ -21,6 +21,7 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Locale;
 import java.util.Objects;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
@@ -509,7 +510,7 @@ public class ElanL2GatewayUtils {
         Collection<LocalUcastMacs> lstUcastLocalMacs = l2gwDevice.getUcastLocalMacs();
         if (!lstUcastLocalMacs.isEmpty()) {
             macs.addAll(lstUcastLocalMacs.stream().filter(Objects::nonNull)
-                    .map(mac -> new MacAddress(mac.getMacEntryKey().getValue().toLowerCase()))
+                    .map(mac -> new MacAddress(mac.getMacEntryKey().getValue().toLowerCase(Locale.ENGLISH)))
                     .collect(Collectors.toList()));
         }
 
@@ -1117,7 +1118,7 @@ public class ElanL2GatewayUtils {
         Set<MacAddress> macs = new HashSet<>();
         if (!lstUcastLocalMacs.isEmpty()) {
             macs.addAll(lstUcastLocalMacs.stream().filter(Objects::nonNull)
-                    .map(mac -> new MacAddress(mac.getMacEntryKey().getValue().toLowerCase()))
+                    .map(mac -> new MacAddress(mac.getMacEntryKey().getValue().toLowerCase(Locale.ENGLISH)))
                     .collect(Collectors.toList()));
         }
         Optional<Node> configNode = MDSALUtil.read(broker, LogicalDatastoreType.CONFIGURATION,
index bcca8a628b4dc241d71a88f5cb6978828acff53c..eb22f639438fd7101c455a037e1a66403e33f2a2 100644 (file)
@@ -94,7 +94,7 @@ public class ElanItmUtils {
             }
 
         } catch (InterruptedException | ExecutionException e) {
-            LOG.error("Error in RPC call getTunnelInterfaceName {}", e);
+            LOG.error("Error in RPC call getTunnelInterfaceName", e);
         }
 
         return result;
@@ -118,7 +118,7 @@ public class ElanItmUtils {
             }
 
         } catch (InterruptedException | ExecutionException e) {
-            LOG.error("Error in RPC call getTunnelInterfaceName {}", e);
+            LOG.error("Error in RPC call getTunnelInterfaceName", e);
         }
 
         return result;
@@ -158,7 +158,7 @@ public class ElanItmUtils {
                         destinationDpnId);
             }
         } catch (InterruptedException | ExecutionException e) {
-            LOG.error("Error in RPC call getTunnelInterfaceName {}", e);
+            LOG.error("Error in RPC call getTunnelInterfaceName", e);
         }
         return result;
     }
@@ -224,7 +224,7 @@ public class ElanItmUtils {
                 }
             }
         } catch (Exception e) {
-            LOG.error("Error in RPC call getEgressActionsForInterface {}", e);
+            LOG.error("Error in RPC call getEgressActionsForInterface", e);
         }
         LOG.warn("Could not build Egress actions for interface {} and tunnelId {}", interfaceName, tunnelKey);
         return Collections.emptyList();
index af5beaf7153765db8a30257928d06e3bf4936947..1a6dc47e0d39dde4414da2fa20ba5b64aa04ebd2 100644 (file)
@@ -59,6 +59,7 @@ import org.opendaylight.genius.mdsalutil.matches.MatchMetadata;
 import org.opendaylight.genius.utils.batching.SubTransaction;
 import org.opendaylight.genius.utils.batching.SubTransactionImpl;
 import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.netvirt.fibmanager.NexthopManager.AdjacencyResult;
 import org.opendaylight.netvirt.fibmanager.api.FibHelper;
 import org.opendaylight.netvirt.fibmanager.api.RouteOrigin;
@@ -151,7 +152,8 @@ public class BaseVrfEntryHandler implements AutoCloseable {
         try {
             nextHopManager.removeLocalNextHop(dpId, vpnId, ipAddress, ipPrefixAddress);
         } catch (NullPointerException e) {
-            LOG.trace("", e);
+            // FIXME: NPEs should not be caught but rather their root cause should be eliminated
+            LOG.trace("Failed to remove nexthop", e);
         }
     }
 
@@ -227,7 +229,8 @@ public class BaseVrfEntryHandler implements AutoCloseable {
                         .collect(toList()));
             }
         } catch (NullPointerException e) {
-            LOG.trace("", e);
+            // FIXME: NPEs should not be caught but rather their root cause should be eliminated
+            LOG.trace("Failed to remove adjacency", e);
         }
         return adjacencyList;
     }
@@ -418,7 +421,7 @@ public class BaseVrfEntryHandler implements AutoCloseable {
         for (AdjacencyResult adjacencyResult : adjacencyResults) {
             String interfaceName = adjacencyResult.getInterfaceName();
             if (null == fibUtil.getInterfaceStateFromOperDS(interfaceName)) {
-                res = fibUtil.buildStateInterfaceId(interfaceName);
+                res = FibUtil.buildStateInterfaceId(interfaceName);
                 break;
             }
         }
@@ -439,15 +442,17 @@ public class BaseVrfEntryHandler implements AutoCloseable {
                     absentInterfaceStateIid,
                     (before, after) -> {
                         LOG.info("programRemoteFib: waited for and got interface state {}", absentInterfaceStateIid);
-                        txRunner.callWithNewWriteOnlyTransactionAndSubmit(
-                            (wtx) -> programRemoteFib(remoteDpnId, vpnId, vrfEntry, wtx, rd, adjacencyResults, null));
+                        LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(
+                            (wtx) -> programRemoteFib(remoteDpnId, vpnId, vrfEntry, wtx, rd, adjacencyResults, null)),
+                            LOG, "Failed to program remote FIB {}", absentInterfaceStateIid);
                         return DataTreeEventCallbackRegistrar.NextAction.UNREGISTER;
                     },
                     Duration.of(15, ChronoUnit.MINUTES),
                     (iid) -> {
                         LOG.error("programRemoteFib: timed out waiting for {}", absentInterfaceStateIid);
-                        txRunner.callWithNewWriteOnlyTransactionAndSubmit(
-                            (wtx) -> programRemoteFib(remoteDpnId, vpnId, vrfEntry, wtx, rd, adjacencyResults, null));
+                        LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(
+                            (wtx) -> programRemoteFib(remoteDpnId, vpnId, vrfEntry, wtx, rd, adjacencyResults, null)),
+                            LOG, "Failed to program timed-out remote FIB {}", absentInterfaceStateIid);
                     });
                 return;
             }
index e7da0697aac76d22bf320af4ba57256b4f54716a..77d085012a9a58271a2a36138c7e1670fa55bfd2 100644 (file)
@@ -237,7 +237,8 @@ public class NexthopManager implements AutoCloseable {
             RpcResult<AllocateIdOutput> rpcResult = result.get();
             return rpcResult.getResult().getIdValue();
         } catch (NullPointerException | InterruptedException | ExecutionException e) {
-            LOG.trace("", e);
+            // FIXME: NPEs should not be caught but rather their root cause should be eliminated
+            LOG.trace("Failed to allocate {}", getIdInput, e);
         }
         return 0;
     }
index 188658ee90d1a309a6c5b146abf3883448e7dca2..15b87bbfae335775ca330db418af5ea058d40711 100644 (file)
@@ -276,8 +276,7 @@ public class RouterDpnChangeListener
                                     }
                                     LOG.debug("remove : Retrieved vpnId {} for router {}", vpnId, routerUuid);
                                     //Remove default entry in FIB
-                                    LOG.debug("remove : Removing default route in FIB on dpn {} for vpn {} ...", dpnId,
-                                        vpnName);
+                                    LOG.debug("remove : Removing default route in FIB on dpn {} ...", dpnId);
                                     snatDefaultRouteProgrammer.removeDefNATRouteInDPN(dpnId, vpnId, confTx);
                                 } else {
                                     LOG.debug("remove : External vpn associated to router {}", routerUuid);
index be51f48945fbe310d5bfcdca04c5b64068a83514..131a0d58d87f4388e4fe8cf4e4ef5623d62c0306 100644 (file)
@@ -2564,7 +2564,7 @@ public class NeutronvpnManager implements NeutronvpnService, AutoCloseable, Even
             }
             Network network = neutronvpnUtils.getNeutronNetwork(nw);
             if (network == null) {
-                LOG.error("dissociateNetworksFromVpn: Network {} not found in ConfigDS");
+                LOG.error("dissociateNetworksFromVpn: Network {} not found in ConfigDS", nw.getValue());
                 failedNwList.add(String.format("Failed to disassociate network %s as is not found in ConfigDS",
                         nw.getValue()));
                 continue;
index aba1faa457f106702b489ae75f0ac2700798f004..424799194a9bbbb4add83e9da101d3c561958ab2 100644 (file)
@@ -151,7 +151,7 @@ public class ConfigurationClassifierImpl implements ClassifierState {
         }
 
         if (destinationPort != null) {
-            LOG.warn("Ace {}: destination port is ignored combined with RSP redirect");
+            LOG.warn("Ace {}: destination port is ignored combined with RSP redirect", ruleName);
         }
 
         List<String> interfaces = new ArrayList<>();
index 343928b6b7687efdd2ee3a449d6da073121db94e..725de2fbf31099ccfc29775aacaf1e7f847c6547 100644 (file)
@@ -424,7 +424,7 @@ public class InterfaceStateChangeListener
 
         @Override
         public void onFailure(Throwable throwable) {
-            LOG.debug("write Tx config operation failed {}", throwable);
+            LOG.debug("write Tx config operation failedTunnelEndPointChangeListener", throwable);
         }
     }
 }
index e751fd0b9138b7a2c90dbf644604ff1436a49225..178be95bf80b8b6eb5d5c4d26cee5f99bc58e5ce 100644 (file)
@@ -15,7 +15,6 @@ import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.MoreExecutors;
-
 import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -148,7 +147,7 @@ public class TunnelEndPointChangeListener
 
                                     @Override
                                     public void onFailure(Throwable throwable) {
-                                        LOG.debug("addVpnInterface: write Tx config execution failed {}", throwable);
+                                        LOG.debug("addVpnInterface: write Tx config execution failed", throwable);
                                     }
                                 }, MoreExecutors.directExecutor());
                                 futures.add(writeConfigFuture);
index f036f552d7a0570e0ce493efec16b96d6ea55586..9877a2ad7fb656a492d7a12b6866cd7b13feab37 100755 (executable)
@@ -775,7 +775,7 @@ public class VpnInterfaceManager extends AsyncDataTreeChangeListenerBase<VpnInte
         boolean isL3VpnOverVxLan = VpnUtil.isL3VpnOverVxLan(l3vni);
         VrfEntry.EncapType encapType = isL3VpnOverVxLan ? VrfEntry.EncapType.Vxlan : VrfEntry.EncapType.Mplsgre;
         VpnPopulator registeredPopulator = L3vpnRegistry.getRegisteredPopulator(encapType);
-        List<Adjacency> nextHops = (adjacencies != null) ? adjacencies.getAdjacency() : emptyList();
+        List<Adjacency> nextHops = adjacencies != null ? adjacencies.getAdjacency() : emptyList();
         List<Adjacency> value = new ArrayList<>();
         for (Adjacency nextHop : nextHops) {
             String rd = primaryRd;
@@ -795,7 +795,7 @@ public class VpnInterfaceManager extends AsyncDataTreeChangeListenerBase<VpnInte
                 LOG.debug("processVpnInterfaceAdjacencies: Adding prefix {} to interface {} with nextHops {} on dpn {}"
                         + " for vpn {}", prefix, interfaceName, nhList, dpnId, vpnName);
 
-                Prefixes prefixes = (intfnetworkUuid != null)
+                Prefixes prefixes = intfnetworkUuid != null
                     ? VpnUtil.getPrefixToInterface(dpnId, interfaceName, prefix, intfnetworkUuid ,networkType,
                             segmentationId, prefixCue) :
                     VpnUtil.getPrefixToInterface(dpnId, interfaceName, prefix, prefixCue);
@@ -1641,7 +1641,7 @@ public class VpnInterfaceManager extends AsyncDataTreeChangeListenerBase<VpnInte
             isVpnInstanceUpdate = true;
             if (VpnUtil.isDualRouterVpnUpdate(oldVpnListCopy, newVpnListCopy)) {
                 if ((oldVpnListCopy.size() == 2 || oldVpnListCopy.size() == 3)
-                        && (oldVpnList.size() == 1 && newVpnList.size() == 0)) {
+                        && oldVpnList.size() == 1 && newVpnList.size() == 0) {
                     //Identify the external BGP-VPN Instance and pass that value as newVpnList
                     List<String> externalBgpVpnList = new ArrayList<>();
                     for (String newVpnName : newVpnListCopy) {
@@ -1658,7 +1658,7 @@ public class VpnInterfaceManager extends AsyncDataTreeChangeListenerBase<VpnInte
                             externalBgpVpnList, oldVpnListCopy, futures);
 
                 } else if ((oldVpnListCopy.size() == 2 || oldVpnListCopy.size() == 3)
-                        && (oldVpnList.size() == 0 && newVpnList.size() == 1)) {
+                        && oldVpnList.size() == 0 && newVpnList.size() == 1) {
                     //Identify the router VPN Instance and pass that value as oldVpnList
                     List<String> routerVpnList = new ArrayList<>();
                     for (String newVpnName : newVpnListCopy) {
@@ -1692,10 +1692,10 @@ public class VpnInterfaceManager extends AsyncDataTreeChangeListenerBase<VpnInte
                                          List<String> newVpnList, List<String> oldVpnListCopy,
                                          List<ListenableFuture<Void>> futures) {
         final Adjacencies origAdjs = original.augmentation(Adjacencies.class);
-        final List<Adjacency> oldAdjs = (origAdjs != null && origAdjs.getAdjacency() != null)
+        final List<Adjacency> oldAdjs = origAdjs != null && origAdjs.getAdjacency() != null
                 ? origAdjs.getAdjacency() : new ArrayList<>();
         final Adjacencies updateAdjs = update.augmentation(Adjacencies.class);
-        final List<Adjacency> newAdjs = (updateAdjs != null && updateAdjs.getAdjacency() != null)
+        final List<Adjacency> newAdjs = updateAdjs != null && updateAdjs.getAdjacency() != null
                 ? updateAdjs.getAdjacency() : new ArrayList<>();
 
         boolean isOldVpnRemoveCallExecuted = false;
@@ -2414,7 +2414,7 @@ public class VpnInterfaceManager extends AsyncDataTreeChangeListenerBase<VpnInte
 
         @Override
         public void onFailure(Throwable throwable) {
-            LOG.debug("write Tx config operation failed {}", throwable);
+            LOG.debug("write Tx config operation failed", throwable);
         }
     }
 }
index f0ceef259b9882a8d673a6a6d565f4bd7c86f2d8..643ffea158a173333b70ed15f8008a5c69cabbc9 100644 (file)
@@ -277,9 +277,9 @@ public class VpnOpStatusListener extends AsyncDataTreeChangeListenerBase<VpnInst
                                 bgpManager.addVrf(rd, importRTList, ertList, AddressFamily.IPV6);
                             }
                         }
-                    } catch (Exception e) {
-                        LOG.error("VpnOpStatusListener.update: Exception when updating VRF to BGP"
-                               + " for vpn {} rd {}", vpnName, rd);
+                    } catch (RuntimeException e) {
+                        LOG.error("VpnOpStatusListener.update: Exception when updating VRF to BGP for vpn {} rd {}",
+                            vpnName, rd, e);
                     }
                 });
                 return emptyList();
index 1bbcb0c6bf7930da5a21020f22ca4d0e60edc903..b27a786741fe42d561ced6fab19f23b2a62fe7ce 100755 (executable)
@@ -446,7 +446,7 @@ public class IVpnLinkServiceImpl implements IVpnLinkService, AutoCloseable {
         try {
             interVpnLinkUtil.handleStaticRoute(ivpnLink, vpnId, destination, routeNextHop, label);
         } catch (Exception e) {
-            LOG.error("Exception while advertising prefix for intervpn link, {}", e);
+            LOG.error("Exception while advertising prefix for intervpn link", e);
         }
     }
 }