re-activate FindBugs 96/77796/11
authorMichael Vorburger <vorburger@redhat.com>
Wed, 14 Nov 2018 14:48:00 +0000 (15:48 +0100)
committerMichael Vorburger <vorburger@redhat.com>
Fri, 16 Nov 2018 12:39:19 +0000 (13:39 +0100)
and fix a lot of logging format bugs which we now automatically detect

and also addresses a few other mistakes identified by FB

Change-Id: I37f0ab54736ba55f23cd3a1fa23c8263a4f3e212
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
46 files changed:
applications/arbitratorreconciliation/api/pom.xml
applications/arbitratorreconciliation/impl/pom.xml
applications/forwardingrules-manager/pom.xml
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/BundleFlowForwarder.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/BundleGroupForwarder.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowForwarder.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowNodeReconciliationImpl.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/GroupForwarder.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/TableForwarder.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/nodeconfigurator/JobEntry.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/util/FrmUtil.java
applications/forwardingrules-sync/pom.xml
applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/dao/FlowCapableNodeOdlDao.java
applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/impl/AbstractFrmSyncListener.java
applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/impl/clustering/DeviceMastership.java
applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/util/FxChainUtil.java
applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/util/SemaphoreKeeperGuavaImpl.java
applications/reconciliation-framework/pom.xml
openflowjava/openflow-protocol-impl/pom.xml
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/OFDatagramPacketDecoder.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/OFDecoder.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/SslKeyStore.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/OutboundQueueEntry.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MeterModInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/util/ListDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/statistics/StatisticsCounters.java
openflowplugin-common/pom.xml
openflowplugin-common/src/main/java/org/opendaylight/openflowplugin/common/wait/SimpleTaskRetryLooper.java
openflowplugin-impl/pom.xml
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/OpenFlowPluginProviderImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/configuration/ConfigurationServiceFactoryImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/configuration/ConfigurationServiceFactoryOsgiImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/connection/ErrorHandlerSimpleImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/connection/listener/ConnectionReadyListenerImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/connection/listener/SystemNotificationsListenerImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/datastore/multipart/AbstractMultipartWriter.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/device/DeviceContextImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/MeterMessageSerializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/RoleService.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/sal/SalFlowServiceImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/sal/SalGroupServiceImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/sal/SalMeterServiceImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsGatheringUtils.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/ofpspecific/MessageIntelligenceAgencyImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/translator/FlowRemovedTranslator.java
parent/pom.xml

index 849aea841e769251d2b8e3ec9608685ea63a93b2..e457490ddca81667500b4e442270974414afe61f 100644 (file)
             <version>${project.version}</version>
         </dependency>
     </dependencies>
-
-    <build>
-        <plugins>
-            <!-- TODO Remove this when we upgrade to odlparent with a fix for ODLPARENT-146 -->
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>findbugs-maven-plugin</artifactId>
-                <configuration>
-                    <failOnError>false</failOnError>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
 </project>
index ffbe1211106ab92490fb8fc729dc32550d438482..2946b62d339b262ed68f0c4cd280d2988e8e0867 100644 (file)
                 <groupId>org.apache.aries.blueprint</groupId>
                 <artifactId>blueprint-maven-plugin</artifactId>
             </plugin>
-
-            <!-- TODO Remove this when we upgrade to odlparent with a fix for ODLPARENT-146 -->
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>findbugs-maven-plugin</artifactId>
-                <configuration>
-                    <failOnError>false</failOnError>
-                </configuration>
-            </plugin>
         </plugins>
     </build>
-
 </project>
index aabf9e4274bce273c6f118aed39df00129400288..96911c92a8d52574e4f7c1fa3e193be4ae1a54e6 100644 (file)
     </dependency>
   </dependencies>
 
-  <build>
-    <plugins>
-      <!-- TODO Remove this when we upgrade to odlparent with a fix for ODLPARENT-146 -->
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>findbugs-maven-plugin</artifactId>
-        <configuration>
-          <failOnError>false</failOnError>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
   <scm>
     <connection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</connection>
     <developerConnection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</developerConnection>
     <url>https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin:Main</url>
     <tag>HEAD</tag>
   </scm>
-
 </project>
index 8f1caaedfcac7c3dad240111cf36e6d6cfded59f..88e90e8a2992f036623c20cf1e6a8f45aa0f12e9 100644 (file)
@@ -21,6 +21,7 @@ import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.MoreExecutors;
 import com.google.common.util.concurrent.SettableFuture;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.ExecutionException;
@@ -201,7 +202,6 @@ public class BundleFlowForwarder {
         private final BundleId bundleId;
         private final Message message;
         private final NodeId nodeId;
-        private ListenableFuture<RpcResult<AddBundleMessagesOutput>> flowFuture;
 
         BundleFlowCallBack(InstanceIdentifier<FlowCapableNode> nodeIdent, BundleId bundleId, Message message,
                 ListenableFuture<RpcResult<AddFlowOutput>> flowFuture) {
@@ -212,6 +212,7 @@ public class BundleFlowForwarder {
         }
 
         @Override
+        @SuppressFBWarnings("RV_RETURN_VALUE_IGNORED")
         public void onSuccess(RpcResult<AddBundleMessagesOutput> rpcResult) {
             if (rpcResult.isSuccessful()) {
                 List<Message> messages = new ArrayList<>(1);
@@ -221,15 +222,12 @@ public class BundleFlowForwarder {
                         .setFlags(BUNDLE_FLAGS).setMessages(new MessagesBuilder().setMessage(messages).build()).build();
                 LOG.trace("Pushing flow add message {} to bundle {} for device {}", addBundleMessagesInput,
                         bundleId.getValue(), nodeId.getValue());
-                flowFuture = forwardingRulesManager.getSalBundleService().addBundleMessages(addBundleMessagesInput);
-            } else {
-                flowFuture = Futures.immediateFuture(null);
+                forwardingRulesManager.getSalBundleService().addBundleMessages(addBundleMessagesInput);
             }
         }
 
         @Override
         public void onFailure(Throwable throwable) {
-            flowFuture = Futures.immediateFailedFuture(null);
             LOG.error("Error while pushing flow add bundle {} for device {}", message, nodeId);
         }
     }
index bebbdf74515f6a8b6ef68dc777870705ff814a5c..ab3be9549be030d3eab9964c77f23cd74ad65a5c 100644 (file)
@@ -170,6 +170,7 @@ public class BundleGroupForwarder {
             this.nodeId = nodeId;
         }
 
+        @Override
         public void onSuccess(RpcResult<AddBundleMessagesOutput> result) {
             if (result.isSuccessful()) {
                 forwardingRulesManager.getDevicesGroupRegistry().storeGroup(nodeId, groupId);
@@ -182,8 +183,7 @@ public class BundleGroupForwarder {
 
         @Override
         public void onFailure(Throwable throwable) {
-            LOG.error("Service call for updating group {} failed for node {} with error {}", groupId, nodeId,
-                    throwable);
+            LOG.error("Service call for updating group {} failed for node {}", groupId, nodeId, throwable);
         }
     }
 
index 1decf02ff45bb54a7689dc65366f7bc0710c3133..45f3ae3b065b035f66bd8dbe9a15e2194ab87376 100644 (file)
@@ -21,6 +21,7 @@ import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.MoreExecutors;
 import com.google.common.util.concurrent.SettableFuture;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
@@ -41,7 +42,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.ta
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.StaleFlowKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowOutput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowTableRef;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.RemoveFlowInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.RemoveFlowOutput;
@@ -243,28 +243,27 @@ public class FlowForwarder extends AbstractListeningCommiter<Flow> {
                     builder.setFlowTable(new FlowTableRef(nodeIdent.child(Table.class, tableKey)));
                     builder.setTransactionUri(new Uri(provider.getNewTransactionId()));
                     Long groupId = isFlowDependentOnGroup(addDataObj);
-                    ListenableFuture<RpcResult<AddFlowOutput>> future = SettableFuture.create();
                     if (groupId != null) {
                         LOG.trace("The flow {} is dependent on group {}. Checking if the group is already present",
                                 getFlowId(new FlowRef(identifier)), groupId);
                         if (isGroupExistsOnDevice(nodeIdent, groupId, provider)) {
                             LOG.trace("The dependent group {} is already programmed. Adding the flow {}", groupId,
                                     getFlowId(new FlowRef(identifier)));
-                            future = provider.getSalFlowService().addFlow(builder.build());
+                            return provider.getSalFlowService().addFlow(builder.build());
                         } else {
                             LOG.trace("The dependent group {} isn't programmed yet. Pushing the group", groupId);
                             ListenableFuture<RpcResult<AddGroupOutput>> groupFuture = pushDependentGroup(nodeIdent,
                                     groupId);
-                            Futures.addCallback(groupFuture, new AddFlowCallBack(builder.build(), nodeId, future,
-                                            groupId),
+                            Futures.addCallback(groupFuture, new AddFlowCallBack(builder.build(), nodeId, groupId),
                                     MoreExecutors.directExecutor());
+                            // TODO This makes new sense and seems just wrong...
+                            return SettableFuture.create();
                         }
                     } else {
                         LOG.trace("The flow {} is not dependent on any group. Adding the flow",
                                 getFlowId(new FlowRef(identifier)));
-                        future = provider.getSalFlowService().addFlow(builder.build());
+                        return provider.getSalFlowService().addFlow(builder.build());
                     }
-                    return future;
                 });
             }
         }
@@ -370,22 +369,21 @@ public class FlowForwarder extends AbstractListeningCommiter<Flow> {
     private final class AddFlowCallBack implements FutureCallback<RpcResult<AddGroupOutput>> {
         private final AddFlowInput addFlowInput;
         private final NodeId nodeId;
-        private ListenableFuture<RpcResult<AddFlowOutput>> future;
         private final Long groupId;
 
-        private AddFlowCallBack(final AddFlowInput addFlowInput, final NodeId nodeId,
-                ListenableFuture<RpcResult<AddFlowOutput>> future, Long groupId) {
+        // TODO
+        private AddFlowCallBack(final AddFlowInput addFlowInput, final NodeId nodeId, Long groupId) {
             this.addFlowInput = addFlowInput;
             this.nodeId = nodeId;
-            this.future = future;
             this.groupId = groupId;
         }
 
         @Override
+        @SuppressFBWarnings("RV_RETURN_VALUE_IGNORED")
         public void onSuccess(RpcResult<AddGroupOutput> rpcResult) {
             if (rpcResult.isSuccessful()) {
                 provider.getDevicesGroupRegistry().storeGroup(nodeId, groupId);
-                future = provider.getSalFlowService().addFlow(addFlowInput);
+                provider.getSalFlowService().addFlow(addFlowInput);
                 LOG.debug("Flow add with id {} finished without error for node {}",
                         getFlowId(addFlowInput.getFlowRef()), nodeId);
             } else {
@@ -393,44 +391,41 @@ public class FlowForwarder extends AbstractListeningCommiter<Flow> {
                         && rpcResult.getErrors().iterator().next().getMessage()
                         .contains(GROUP_EXISTS_IN_DEVICE_ERROR)) {
                     provider.getDevicesGroupRegistry().storeGroup(nodeId, groupId);
-                    future = provider.getSalFlowService().addFlow(addFlowInput);
+                    provider.getSalFlowService().addFlow(addFlowInput);
                     LOG.debug("Group {} already programmed in the device. Adding the flow {}", groupId,
                             getFlowId(addFlowInput.getFlowRef()));
                 } else {
                     LOG.error("Flow add with id {} failed for node {} with error {}",
                             getFlowId(addFlowInput.getFlowRef()), nodeId, rpcResult.getErrors().toString());
-                    future = Futures.immediateFuture(null);
                 }
             }
         }
 
         @Override
         public void onFailure(Throwable throwable) {
-            LOG.error("Service call for adding flow with id {} failed for node {} with error {}",
-                    getFlowId(addFlowInput.getFlowRef()), nodeId, throwable.getCause());
-            Futures.immediateFailedFuture(null);
+            LOG.error("Service call for adding flow with id {} failed for node {}",
+                    getFlowId(addFlowInput.getFlowRef()), nodeId, throwable);
         }
     }
 
     private final class UpdateFlowCallBack implements FutureCallback<RpcResult<AddGroupOutput>> {
         private final UpdateFlowInput updateFlowInput;
         private final NodeId nodeId;
-        private ListenableFuture<RpcResult<UpdateFlowOutput>> future;
         private final Long groupId;
 
         private UpdateFlowCallBack(final UpdateFlowInput updateFlowInput, final NodeId nodeId,
                 ListenableFuture<RpcResult<UpdateFlowOutput>> future, Long groupId) {
             this.updateFlowInput = updateFlowInput;
             this.nodeId = nodeId;
-            this.future = future;
             this.groupId = groupId;
         }
 
         @Override
+        @SuppressFBWarnings("RV_RETURN_VALUE_IGNORED")
         public void onSuccess(RpcResult<AddGroupOutput> rpcResult) {
             if (rpcResult.isSuccessful()) {
                 provider.getDevicesGroupRegistry().storeGroup(nodeId, groupId);
-                future = provider.getSalFlowService().updateFlow(updateFlowInput);
+                provider.getSalFlowService().updateFlow(updateFlowInput);
                 LOG.debug("Flow update with id {} finished without error for node {}",
                         getFlowId(updateFlowInput.getFlowRef()), nodeId);
             } else {
@@ -438,22 +433,20 @@ public class FlowForwarder extends AbstractListeningCommiter<Flow> {
                         && rpcResult.getErrors().iterator().next().getMessage()
                         .contains(GROUP_EXISTS_IN_DEVICE_ERROR)) {
                     provider.getDevicesGroupRegistry().storeGroup(nodeId, groupId);
-                    future = provider.getSalFlowService().updateFlow(updateFlowInput);
+                    provider.getSalFlowService().updateFlow(updateFlowInput);
                     LOG.debug("Group {} already programmed in the device. Updating the flow {}", groupId,
                             getFlowId(updateFlowInput.getFlowRef()));
                 } else {
                     LOG.error("Flow update with id {} failed for node {} with error {}",
                             getFlowId(updateFlowInput.getFlowRef()), nodeId, rpcResult.getErrors().toString());
-                    future = Futures.immediateFuture(null);
                 }
             }
         }
 
         @Override
         public void onFailure(Throwable throwable) {
-            LOG.error("Service call for updating flow with id {} failed for node {} with error {}",
+            LOG.error("Service call for updating flow with id {} failed for node {}",
                     getFlowId(updateFlowInput.getFlowRef()), nodeId, throwable);
-            future = Futures.immediateFailedFuture(null);
         }
     }
 }
index 03625601c2ab97b7424436656bb820142828dece..bde8214ca80d77d6671eaf32ba1853e32da24efd 100644 (file)
@@ -491,9 +491,8 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation {
 
                 @Override
                 public void onFailure(Throwable cause) {
-                    String msg = "add-group RPC failed: node=" + nodeIdentity.firstKeyOf(Node.class).getId().getValue()
-                            + ", id=" + groupId;
-                    LOG.debug(msg, cause);
+                    LOG.debug("add-group RPC failed: node={}, id={}",
+                            nodeIdentity.firstKeyOf(Node.class).getId().getValue(), groupId, cause);
                 }
             }, MoreExecutors.directExecutor());
 
index 5a08be041baac7c520850dfd7c0d7b43e4deeb3f..0553c45cb4d64e081da52464a7ba412b503edaf8 100644 (file)
@@ -256,7 +256,7 @@ public class GroupForwarder extends AbstractListeningCommiter<Group> {
                 LOG.debug("Group add with id {} finished without error for node {}", groupId, nodeId);
             } else {
                 LOG.debug("Group add with id {} failed for node {} with error {}", groupId, nodeId,
-                        result.getErrors().toString());
+                        result.getErrors());
             }
         }
 
@@ -275,6 +275,7 @@ public class GroupForwarder extends AbstractListeningCommiter<Group> {
             this.nodeId = nodeId;
         }
 
+        @Override
         public void onSuccess(RpcResult<UpdateGroupOutput> result) {
             if (result.isSuccessful()) {
                 provider.getDevicesGroupRegistry().storeGroup(nodeId, groupId);
@@ -287,7 +288,7 @@ public class GroupForwarder extends AbstractListeningCommiter<Group> {
 
         @Override
         public void onFailure(Throwable throwable) {
-            LOG.error("Service call for updating group {} failed for node {} with error {}", groupId, nodeId,
+            LOG.error("Service call for updating group {} failed for node {} with", groupId, nodeId,
                     throwable);
         }
     }
index 473d7f2d79227f6b3836bbcc2f42674b2d544b9f..146b0d85357d1dce8067167a6f6dbe3981cae45c 100644 (file)
@@ -85,8 +85,8 @@ public class TableForwarder extends AbstractListeningCommiter<TableFeatures> {
     @Override
     public void update(final InstanceIdentifier<TableFeatures> identifier, final TableFeatures original,
             final TableFeatures update, final InstanceIdentifier<FlowCapableNode> nodeIdent) {
-        LOG.debug("Received the Table Update request [Tbl id, node Id, original, upd" + " " + identifier + " "
-                + nodeIdent + " " + original + " " + update);
+        LOG.debug("Received the Table Update request [Tbl id, node Id, original, upd {} {} {} {}", identifier,
+                nodeIdent, original, update);
 
         final TableFeatures originalTableFeatures = original;
         TableFeatures updatedTableFeatures;
@@ -113,7 +113,7 @@ public class TableForwarder extends AbstractListeningCommiter<TableFeatures> {
         LOG.debug("Invoking SalTableService ");
 
         if (this.provider.getSalTableService() != null) {
-            LOG.debug(" Handle to SalTableServices" + this.provider.getSalTableService());
+            LOG.debug(" Handle to SalTableServices {}", this.provider.getSalTableService());
         }
 
         final Future<RpcResult<UpdateTableOutput>> resultFuture =
index 921bbcbb7f9c8ce208989abc65ef92a0c3f63fe1..c6c19a6419ceedcff3554b0edc5fd523dd8029fe 100644 (file)
@@ -44,7 +44,7 @@ class JobEntry<T> {
         return resultFuture;
     }
 
-    public void setResultFuture(T result) {
+    public void setResultFuture(@Nullable T result) {
         this.resultFuture.set(result);
     }
 
index 6a89273799dbf2ae325e3e73dba470dbb70c9e59..d28cb2c348dd42948fe9fc3196b0dbb6f296d60f 100644 (file)
@@ -70,7 +70,7 @@ public final class FrmUtil {
                 List<Action> actions = Collections.emptyList();
                 if (instruction.getInstruction().getImplementedInterface()
                         .equals(ActionType.APPLY_ACTION.getActionType())) {
-                    actions = ((ApplyActionsCase) (instruction.getInstruction()))
+                    actions = ((ApplyActionsCase) instruction.getInstruction())
                             .getApplyActions().getAction();
                 }
                 for (Action action : actions) {
@@ -99,18 +99,17 @@ public final class FrmUtil {
         BigInteger dpId = getDpnIdFromNodeName(nodeIdent);
         final NodeRef nodeRef = new NodeRef(nodeIdent.firstIdentifierOf(Node.class));
         GetActiveBundleInputBuilder input = new GetActiveBundleInputBuilder().setNodeId(dpId).setNode(nodeRef);
-        RpcResult<GetActiveBundleOutput> result = null;
         try {
-            result = provider.getArbitratorReconciliationManager()
+            RpcResult<GetActiveBundleOutput> result = provider.getArbitratorReconciliationManager()
                     .getActiveBundle(input.build()).get(RPC_RESULT_TIMEOUT, TimeUnit.MILLISECONDS);
+            if (!result.isSuccessful()) {
+                LOG.trace("Error while retrieving active bundle present for node {}", dpId);
+            } else {
+                return result.getResult().getResult();
+            }
         } catch (InterruptedException | ExecutionException | TimeoutException e) {
             LOG.error("Error while retrieving active bundle present for node {}", dpId , e);
         }
-        if (!result.isSuccessful()) {
-            LOG.trace("Error while retrieving active bundle present for node {}", dpId);
-        } else {
-            return result.getResult().getResult();
-        }
         return null;
     }
 
index 2af0abca8ff2f64d9377bbbe2f312411566339ff..c662b87db0d9884b924c2824c5797e17a29b9abf 100644 (file)
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
             </plugin>
-            <!-- TODO Remove this when we upgrade to odlparent with a fix for ODLPARENT-146 -->
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>findbugs-maven-plugin</artifactId>
-                <configuration>
-                    <failOnError>false</failOnError>
-                </configuration>
-            </plugin>
         </plugins>
     </build>
 
index 73c25f19be8745a9eb0282c98ae446e89bf1aa35..3cd3488ed842569868c07c89863197b55d3b6d16 100644 (file)
@@ -48,7 +48,7 @@ public class FlowCapableNodeOdlDao implements FlowCapableNodeDao {
                     NODES_IID.child(Node.class, new NodeKey(nodeId)).augmentation(FlowCapableNode.class);
             return roTx.read(logicalDatastoreType, path).checkedGet(5000, TimeUnit.MILLISECONDS);
         } catch (ReadFailedException | TimeoutException e) {
-            LOG.error("error reading {} -> {}", nodeId.getValue(), e);
+            LOG.error("error reading {}", nodeId.getValue(), e);
         }
 
         return Optional.absent();
index cbf44301cc6a611e8f7af0a1214238a5f434aa6b..5130c9ae150bd9512407dbfb39a3b7fc8b1ca028 100644 (file)
@@ -48,7 +48,7 @@ public abstract class AbstractFrmSyncListener<T extends DataObject> implements N
                     }
                 }
             } catch (InterruptedException | ExecutionException | TimeoutException e) {
-                LOG.error("Error processing inventory node modification: {}, {}", nodeId.getValue(), e);
+                LOG.error("Error processing inventory node modification: {}", nodeId.getValue(), e);
             }
         }
     }
index df1f37ea7a8530e33a5201d1082207ed4699cc16..c09c90eda60a23e46f9114c5f2f38f34673bf7e9 100644 (file)
@@ -67,7 +67,7 @@ public class DeviceMastership implements ClusterSingletonService, AutoCloseable
             try {
                 clusterSingletonServiceRegistration.close();
             } catch (Exception e) {
-                LOG.error("FRS cluster service close fail: {} {}", nodeId.getValue(), e);
+                LOG.error("FRS cluster service close fail: {}", nodeId.getValue(), e);
             }
         }
     }
index 18d79bf1b11b6402be6a14d1d8579eaf95ad4844..f6455896d872f22ffd88840798f3750ea5c02f2b 100644 (file)
@@ -11,7 +11,6 @@ package org.opendaylight.openflowplugin.applications.frsync.util;
 import com.google.common.base.MoreObjects;
 import com.google.common.collect.ImmutableList;
 import com.google.common.util.concurrent.FutureCallback;
-import java.util.Arrays;
 import java.util.Collection;
 import javax.annotation.Nullable;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
@@ -38,20 +37,20 @@ public final class FxChainUtil {
             public void onSuccess(@Nullable final RpcResult<Void> result) {
                 if (result != null) {
                     if (result.isSuccessful()) {
-                        LOG.debug(prefix + " finished successfully: {}", nodeId.getValue());
+                        LOG.debug("{} finished successfully: {}", prefix, nodeId.getValue());
                     } else {
                         final Collection<RpcError> errors = MoreObjects.firstNonNull(result.getErrors(),
                                 ImmutableList.<RpcError>of());
-                        LOG.debug(prefix + " failed: {} -> {}", nodeId.getValue(), Arrays.toString(errors.toArray()));
+                        LOG.debug("{} failed: {} -> {}", prefix, nodeId.getValue(), errors);
                     }
                 } else {
-                    LOG.debug(prefix + " reconciliation failed: {} -> null result", nodeId.getValue());
+                    LOG.debug("{} reconciliation failed: {} -> null result", prefix, nodeId.getValue());
                 }
             }
 
             @Override
             public void onFailure(final Throwable failure) {
-                LOG.debug(prefix + " reconciliation failed seriously: {}", nodeId.getValue(), failure);
+                LOG.debug("{} reconciliation failed seriously: {}", prefix, nodeId.getValue(), failure);
             }
         };
     }
index 9b485d5e89dbc1d1f35766ad10b989e8512098e9..d652aac3e6cbd1005c5e3e03f5839a7158ba4b1f 100644 (file)
@@ -48,7 +48,7 @@ public class SemaphoreKeeperGuavaImpl<K> implements SemaphoreKeeper<K> {
         try {
             guard.acquire();
         } catch (InterruptedException e) {
-            LOG.warn("Could not acquire guard for {}, {}", key, e);
+            LOG.warn("Could not acquire guard for {}", key, e);
             return null;
         }
         return guard;
index 9de2f9efdc50469e547c6e493f6783b13cbd39bc..57bdc2d681ff8e302e34fc6423b152746f68413f 100644 (file)
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <!-- TODO Remove this when we upgrade to odlparent with a fix for ODLPARENT-146 -->
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>findbugs-maven-plugin</artifactId>
-                <configuration>
-                    <failOnError>false</failOnError>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
     <scm>
         <connection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</connection>
         <developerConnection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</developerConnection>
         <url>https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin:Main</url>
         <tag>HEAD</tag>
     </scm>
-
 </project>
index 18b6e0feeb598b97d5ce8d479b882741f7cf9c7e..4d782a1adaeb9697500b002e36bc190d93d50ae8 100644 (file)
                     </execution>
                 </executions>
             </plugin>
-            <!-- TODO Remove this when we upgrade to odlparent with a fix for ODLPARENT-146 -->
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>findbugs-maven-plugin</artifactId>
-                <configuration>
-                    <failOnError>false</failOnError>
-                </configuration>
-            </plugin>
         </plugins>
     </build>
 
index cecbd42d5c8499aa0fac50149db939f1953c9f91..66c36524ea40f3c0f406f8065ea5e5ddf65617e0 100644 (file)
@@ -32,8 +32,7 @@ public class OFDatagramPacketDecoder extends SimpleChannelInboundHandler<Version
     public void channelRead0(final ChannelHandlerContext ctx, final VersionMessageUdpWrapper msg)
             throws Exception {
         if (LOG.isDebugEnabled()) {
-            LOG.debug("UdpVersionMessageWrapper received");
-            LOG.debug("<< {}", ByteBufUtils.byteBufToHexString(msg.getMessageBuffer()));
+            LOG.debug("UdpVersionMessageWrapper received: {}", ByteBufUtils.byteBufToHexString(msg.getMessageBuffer()));
         }
 
         try {
index 35e22830746cda833b9ef18166dd536aa97d1b50..39b278fb52f568ac571340b7d2aa0a662b754246 100644 (file)
@@ -43,8 +43,7 @@ public class OFDecoder extends MessageToMessageDecoder<VersionMessageWrapper> {
     protected void decode(ChannelHandlerContext ctx, VersionMessageWrapper msg, List<Object> out) throws Exception {
         statisticsCounter.incrementCounter(CounterEventTypes.US_RECEIVED_IN_OFJAVA);
         if (LOG.isDebugEnabled()) {
-            LOG.debug("VersionMessageWrapper received");
-            LOG.debug("<< {}", ByteBufUtils.byteBufToHexString(msg.getMessageBuffer()));
+            LOG.debug("VersionMessageWrapper received: {}", ByteBufUtils.byteBufToHexString(msg.getMessageBuffer()));
         }
 
         try {
index df25d57535f0e4ac6e2dbaadd99820b02051312b..79c15c3960a80480cc7eea0052f9b6a91a0838c2 100644 (file)
@@ -26,7 +26,6 @@ public final class SslKeyStore {
     private static final Logger LOG = LoggerFactory.getLogger(SslKeyStore.class);
 
     private SslKeyStore() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
     }
 
     /**
@@ -48,8 +47,8 @@ public final class SslKeyStore {
                 }
                 break;
             case PATH:
-                LOG.debug("Current dir using System:"
-                        System.getProperty("user.dir"));
+                LOG.debug("Current dir using System: {}",
+                        System.getProperty("user.dir"));
                 File keystorefile = new File(filename);
                 try {
                     in = new FileInputStream(keystorefile);
index dc4fa86c82e5537ad5b9338d9cf8f33e61ba7299..9ef81e853a444503c0801f76edfe8d1072aca4de 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.openflowjava.protocol.impl.core.connection;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
 import com.google.common.util.concurrent.FutureCallback;
-
+import edu.umd.cs.findbugs.annotations.Nullable;
 import java.util.function.Function;
 
 import org.opendaylight.openflowjava.protocol.api.connection.OutboundQueueException;
@@ -24,17 +24,12 @@ import org.slf4j.LoggerFactory;
 
 final class OutboundQueueEntry {
     private static final Logger LOG = LoggerFactory.getLogger(OutboundQueueEntry.class);
-    public static final Function<OfHeader, Boolean> DEFAULT_IS_COMPLETE = new Function<OfHeader, Boolean>() {
-
-        @Override
-        public Boolean apply(final OfHeader message) {
-            if (message instanceof MultipartReplyMessage) {
-                return !((MultipartReplyMessage) message).getFlags().isOFPMPFREQMORE();
-            }
-
-            return true;
+    public static final Function<OfHeader, Boolean> DEFAULT_IS_COMPLETE = message -> {
+        if (message instanceof MultipartReplyMessage) {
+            return !((MultipartReplyMessage) message).getFlags().isOFPMPFREQMORE();
         }
 
+        return true;
     };
 
     private FutureCallback<OfHeader> callback;
@@ -98,7 +93,7 @@ final class OutboundQueueEntry {
     }
 
     private void checkCompletionNeed() {
-        if (callback == null || (message instanceof PacketOutInput)) {
+        if (callback == null || message instanceof PacketOutInput) {
             completed = true;
             if (callback != null) {
                 callback.onSuccess(null);
@@ -108,7 +103,7 @@ final class OutboundQueueEntry {
         }
     }
 
-    boolean complete(final OfHeader response) {
+    boolean complete(@Nullable final OfHeader response) {
         Preconditions.checkState(!completed, "Attempted to complete a completed message with response %s", response);
 
         // Multipart requests are special, we have to look at them to see
@@ -142,6 +137,6 @@ final class OutboundQueueEntry {
     @VisibleForTesting
     /** This method is only for testing to prove that after queue entry is completed there is not callback future */
     boolean hasCallback() {
-        return (callback != null);
+        return callback != null;
     }
 }
index 9b59029469cccfb902eec49573ef49b0f5d86984..5e920fa11f17a915c11b1537146966849888aadc 100755 (executable)
@@ -96,9 +96,9 @@ public class MeterModInputMessageFactory implements OFSerializer<MeterModInput>,
                                             EncodeConstants.OF13_VERSION_ID, expId, meterBandSubType));
                             serializer.serialize(experimenterBandCase, outBuffer);
                         } catch (final IllegalStateException e) {
-                            LOG.warn("Serializer for key: {} wasn't found, exception {}",
+                            LOG.warn("Serializer for key: {} wasn't found",
                                     ExperimenterSerializerKeyFactory.createMeterBandSerializerKey(
-                                    EncodeConstants.OF13_VERSION_ID, expId, meterBandSubType), e);
+                                    EncodeConstants.OF13_VERSION_ID, expId, meterBandSubType));
                         }
                     }
                 }
index 0a3a9d209681903d1ca9d2492506bbb9a91be8da..a3043d4521e0a61da75e1a747f52b1f294778f27 100644 (file)
@@ -86,12 +86,12 @@ public final class ListDeserializer {
                     // TODO - simplify to correctly report exception during deserialization
                     if (!exceptionLogged) {
                         LOG.warn("Problem during reading table feature property. Skipping unknown feature property: {}."
-                            + "If more information is needed, set org.opendaylight.openflowjava do DEBUG log level.",
-                            key, e.getMessage());
+                            + "If more information is needed, set org.opendaylight.openflowjava do DEBUG log level "
+                            + " ({}).", key, e.getMessage());
                         if (LOG.isDebugEnabled()) {
-                            LOG.debug("Detailed exception: {}", e);
-                            LOG.debug("This exception is logged only once for each multipart reply (table features) to "
-                                + "prevent log flooding. There might be more of table features related exceptions.");
+                            LOG.debug("Detailed exception is logged only once for each multipart reply (table features)"
+                                + "to prevent log flooding. There might be more of table features related exceptions.",
+                                e);
                         }
                         exceptionLogged = true;
                     }
index e4f395412f587a9058b414a2045affe52a10c81d..f234ba991fbf224fe79f2e4e3ab091931f70c6c0 100644 (file)
@@ -245,7 +245,7 @@ public final class StatisticsCounters implements StatisticsHandler {
         @Override
         public void run() {
             for (CounterEventTypes cet : sc.getEnabledCounters()) {
-                LOG.debug("{}: {}", cet.name(), sc.getCountersMap().get(cet).getStat());
+                LOG.debug("Event {}: {}", cet.name(), sc.getCountersMap().get(cet).getStat());
             }
         }
     }
index 6e6fac1a11f537583243a13b3177e87a264a35f4..7bc09cb678a9be147aabf3668c44bd5664428655 100644 (file)
       <scope>test</scope>
     </dependency>
   </dependencies>
-
-  <build>
-    <plugins>
-      <!-- TODO Remove this when we upgrade to odlparent with a fix for ODLPARENT-146 -->
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>findbugs-maven-plugin</artifactId>
-        <configuration>
-          <failOnError>false</failOnError>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
 </project>
index c983058043b5aa80db8e11b6db623935ad2339c1..d0c05c1b21b1719d66b45a51bdc0c1b11090ecbe 100644 (file)
@@ -54,7 +54,7 @@ public class SimpleTaskRetryLooper {
             try {
                 Thread.sleep(tick);
             } catch (InterruptedException e) {
-                LOG.debug("interrupted: {}", e.getMessage(), e);
+                LOG.debug("interrupted", e);
                 Thread.currentThread().interrupt();
             }
         }
index 254626301cf21dfbecc684f2c2c63b1954ef74b9..73c535fc8dd7a22c5bed825bd9631323360aeab6 100644 (file)
                 <artifactId>maven-bundle-plugin</artifactId>
                 <extensions>true</extensions>
             </plugin>
-            <!-- TODO Remove this when we upgrade to odlparent with a fix for ODLPARENT-146 -->
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>findbugs-maven-plugin</artifactId>
-                <configuration>
-                    <failOnError>false</failOnError>
-                </configuration>
-            </plugin>
         </plugins>
     </build>
 </project>
index 7df895f6078f84d29d1aff37874fc8d4b5198aed..31e1872998a219dbe6a1a4f98ed407b362bc033c 100644 (file)
@@ -293,7 +293,7 @@ public class OpenFlowPluginProviderImpl implements
         try {
             shutdownSwitchConnections().get(10, TimeUnit.SECONDS);
         } catch (InterruptedException | ExecutionException | TimeoutException e) {
-            LOG.warn("Failed to shut down switch connections in time {}s, error: {}", 10, e);
+            LOG.warn("Failed to shut down switch connections in time {}s", 10, e);
         }
 
         gracefulShutdown(contextChainHolder);
index 567aa85601e5dcd048baab7ad946591d301d509b..9d2424244da7f840e2c109bdb43f450c7f38d173 100644 (file)
@@ -25,7 +25,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class ConfigurationServiceFactoryImpl implements ConfigurationServiceFactory {
-    private static final Logger LOG = LoggerFactory.getLogger(ConfigurationServiceFactory.class);
+    private static final Logger LOG = LoggerFactory.getLogger(ConfigurationServiceFactoryImpl.class);
 
     @Override
     public ConfigurationService newInstance(
index bd9e1ae540d526911e3ac6b4734663661b27ed50..89f511ecfdb4628bb9df2b3f0a9b8674ed9ee1d0 100644 (file)
@@ -62,7 +62,7 @@ public class ConfigurationServiceFactoryOsgiImpl extends ConfigurationServiceFac
                     configurationService.update(mapProperties);
                 });
             } catch (IOException e) {
-                LOG.debug("Failed to load {} configuration file. Error {}", OFConstants.CONFIG_FILE_ID, e);
+                LOG.debug("Failed to load {} configuration file", OFConstants.CONFIG_FILE_ID);
             }
         });
     }
index ff4dff57f4a1d2a8e6050e7ac8c4eeddd7df981f..7786f9f01cf056369c00601815f579267155d9cb 100644 (file)
@@ -24,9 +24,9 @@ public class ErrorHandlerSimpleImpl implements ErrorHandler {
     @Override
     public void handleException(Throwable throwable) {
         if (throwable instanceof ConnectionException) {
-            LOG.warn("exception -> {}", throwable.getMessage(), throwable);
+            LOG.warn("Exception", throwable);
         } else {
-            LOG.error("exception -> {}", throwable.getMessage(), throwable);
+            LOG.error("Exception", throwable);
         }
     }
 }
index 90607c6f50a9675c9aa9c6dd0febccfd36509739..21769465227e0caa49a333ab525d0675a28c8cad 100644 (file)
@@ -22,8 +22,8 @@ public class ConnectionReadyListenerImpl implements ConnectionReadyListener {
 
     private static final Logger LOG = LoggerFactory.getLogger(ConnectionReadyListenerImpl.class);
 
-    private ConnectionContext connectionContext;
-    private HandshakeContext handshakeContext;
+    private final ConnectionContext connectionContext;
+    private final HandshakeContext handshakeContext;
 
     /**
      * Constructor.
@@ -57,7 +57,7 @@ public class ConnectionReadyListenerImpl implements ConnectionReadyListener {
                         // need to remain in sync lock until initial handshake step processed.
                         handshakeResult.get();
                     } catch (Exception e) {
-                        LOG.error("failed to process onConnectionReady event on device {}, reason {}",
+                        LOG.error("failed to process onConnectionReady event on device {}",
                                 connectionContext.getConnectionAdapter().getRemoteAddress(),
                                 e);
                         connectionContext.closeConnection(false);
index 002e5c49e5a8eff315b688c0a26a89c36ac17fc0..8231e9db820cdfcbc22eea013c0e2e502ce25c01 100644 (file)
@@ -93,7 +93,7 @@ public class SystemNotificationsListenerImpl implements SystemNotificationsListe
                 }
 
                 if (LOG.isTraceEnabled()) {
-                    LOG.trace("Exception while  waiting for echoReply from [{}] in TIMEOUTING state: {}",
+                    LOG.trace("Exception while  waiting for echoReply from [{}] in TIMEOUTING state",
                             remoteAddress, e);
                 }
 
@@ -119,9 +119,8 @@ public class SystemNotificationsListenerImpl implements SystemNotificationsListe
             }
 
             if (LOG.isTraceEnabled()) {
-                LOG.trace("Received EchoReply from [{}] in TIMEOUTING state, Error:{}", remoteAddress, cause);
+                LOG.trace("Received EchoReply from [{}] in TIMEOUTING state", remoteAddress, cause);
             }
-
         }
     }
 }
index 48e548294cc206555858d74119188a442c56927e..6173ddc53247ffe0e4269a0b4715446c0fa76847 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.openflowplugin.impl.datastore.multipart;
 
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.openflowplugin.api.openflow.device.TxFacade;
-import org.opendaylight.openflowplugin.impl.services.AbstractMultipartService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yangtools.yang.binding.DataContainer;
 import org.opendaylight.yangtools.yang.binding.DataObject;
@@ -20,7 +19,7 @@ import org.slf4j.LoggerFactory;
 
 public abstract class AbstractMultipartWriter<T extends DataContainer> {
 
-    private static final Logger LOG = LoggerFactory.getLogger(AbstractMultipartService.class);
+    private static final Logger LOG = LoggerFactory.getLogger(AbstractMultipartWriter.class);
 
     private final TxFacade txFacade;
     private final InstanceIdentifier<Node> instanceIdentifier;
index a171acd0747a4444bc3ebcc28425ea4c366d43a8..6e181f4e2804b18880b54d964424805e2efdf82e 100644 (file)
@@ -755,8 +755,7 @@ public class DeviceContextImpl implements DeviceContext, ExtensionConverterProvi
                     LOG.debug("Cancelled filling flow registry with flows for node: {}", deviceInfo);
                 }
             } else {
-                LOG.warn("Failed filling flow registry with flows for node: {} with exception: {}", deviceInfo,
-                         throwable);
+                LOG.warn("Failed filling flow registry with flows for node: {}", deviceInfo, throwable);
             }
             contextChainMastershipWatcher.onNotAbleToStartMastership(
                     deviceInfo,
index 7482886965bca1af40830ff256432d0d4b2cfb74..516359aa6deaeb418d8de1b0f25254f2ffacbe9e 100644 (file)
@@ -95,7 +95,7 @@ public class MeterMessageSerializer extends AbstractMessageSerializer<MeterMessa
                                         final OFSerializer<Experimenter> serializer = registry.getSerializer(key);
                                         serializer.serialize(band, outBuffer);
                                     } catch (final IllegalStateException e) {
-                                        LOG.warn("Serializer for key: {} wasn't found, exception {}", key, e);
+                                        LOG.warn("Serializer for key: {} wasn't found", key, e);
                                     }
                                 }
                             })));
index c162662b9fecdeca6f0744c357128e97b87e4ecf..0bee9905e51e0eca5fe66938ae96cfb141c8f04a 100644 (file)
@@ -82,8 +82,8 @@ public class RoleService extends AbstractSimpleService<RoleRequestInputBuilder,
                     }
 
                 } else {
-                    LOG.error("getGenerationIdFromDevice RPC error "
-                            roleRequestOutputRpcResult.getErrors().iterator().next().getInfo());
+                    LOG.error("getGenerationIdFromDevice RPC error {}",
+                            roleRequestOutputRpcResult.getErrors().iterator().next().getInfo());
                     finalFuture.setException(new RoleChangeException(ErrorUtil
                             .errorsToString(roleRequestOutputRpcResult.getErrors())));
                 }
index ff33309b2ad9568a09dbf9ef3a02c58dd2ba9cf8..e7aa32659960165eb2ae70a09f87da5c9c127c24 100644 (file)
@@ -227,7 +227,7 @@ public class SalFlowServiceImpl implements SalFlowService {
 
         @Override
         public void onFailure(final Throwable throwable) {
-            LOG.warn("Service call for adding flow={} failed, reason: {}", input, throwable);
+            LOG.warn("Service call for adding flow={} failed", input, throwable);
         }
     }
 
@@ -257,7 +257,7 @@ public class SalFlowServiceImpl implements SalFlowService {
 
         @Override
         public void onFailure(final Throwable throwable) {
-            LOG.warn("Service call for removing flow={} failed, reason: {}", input, throwable);
+            LOG.warn("Service call for removing flow={} failed", input, throwable);
         }
     }
 
@@ -304,7 +304,7 @@ public class SalFlowServiceImpl implements SalFlowService {
 
         @Override
         public void onFailure(final Throwable throwable) {
-            LOG.warn("Service call for updating flow={} failed, reason: {}", input, throwable);
+            LOG.warn("Service call for updating flow={} failed", input, throwable);
         }
     }
 }
index d31096028fa79800bfff3ab24ebaa2ee2c060ad8..9bf3cd68c1234dbcba960a363990f4d7abd1c45b 100755 (executable)
@@ -87,7 +87,7 @@ public class SalGroupServiceImpl implements SalGroupService {
 
             @Override
             public void onFailure(Throwable throwable) {
-                LOG.warn("Service call for adding group={} failed, reason: {}",
+                LOG.warn("Service call for adding group={} failed",
                           input.getGroupId().getValue(),
                           throwable);
             }
@@ -120,7 +120,7 @@ public class SalGroupServiceImpl implements SalGroupService {
 
             @Override
             public void onFailure(Throwable throwable) {
-                LOG.warn("Service call for updating group={} failed, reason: {}",
+                LOG.warn("Service call for updating group={} failed",
                         input.getOriginalGroup().getGroupId(), throwable);
             }
         }, MoreExecutors.directExecutor());
@@ -150,7 +150,7 @@ public class SalGroupServiceImpl implements SalGroupService {
 
             @Override
             public void onFailure(Throwable throwable) {
-                LOG.warn("Service call for removing group={} failed, reason: {}",
+                LOG.warn("Service call for removing group={} failed",
                         input.getGroupId().getValue(), throwable);
             }
         }, MoreExecutors.directExecutor());
index 6c7cd2aae1315ed4ebabc727298b723242613d37..2ba1d62f03c1c64b02723af8e36263ef17d3cad8 100755 (executable)
@@ -89,7 +89,7 @@ public class SalMeterServiceImpl implements SalMeterService {
 
             @Override
             public void onFailure(Throwable throwable) {
-                LOG.warn("Service call for adding meter={} failed, reason: {}", input.getMeterId(), throwable);
+                LOG.warn("Service call for adding meter={} failed", input.getMeterId(), throwable);
             }
         }, MoreExecutors.directExecutor());
         return resultFuture;
@@ -120,7 +120,7 @@ public class SalMeterServiceImpl implements SalMeterService {
 
             @Override
             public void onFailure(Throwable throwable) {
-                LOG.warn("Service call for updating meter={} failed, reason: {}",
+                LOG.warn("Service call for updating meter={} failed",
                         input.getOriginalMeter().getMeterId(), throwable);
             }
         }, MoreExecutors.directExecutor());
@@ -150,7 +150,7 @@ public class SalMeterServiceImpl implements SalMeterService {
 
             @Override
             public void onFailure(Throwable throwable) {
-                LOG.warn("Service call for removing meter={} failed, reason: {}", input.getMeterId(), throwable);
+                LOG.warn("Service call for removing meter={} failed", input.getMeterId(), throwable);
             }
         }, MoreExecutors.directExecutor());
         return resultFuture;
index 7c1128b93f64e7c616f94b5f719f19657f8dcf67..99d37f41f7bb23d1fc42037ca34380dfd788df52 100755 (executable)
@@ -190,7 +190,7 @@ public final class StatisticsGatheringUtils {
                     return null;
                 }, MoreExecutors.directExecutor()).get();
         } catch (InterruptedException | ExecutionException ex) {
-            LOG.debug("Failed to delete {} flows, exception: {}", deviceFlowRegistry.size(), ex);
+            LOG.debug("Failed to delete {} flows", deviceFlowRegistry.size(), ex);
         }
     }
 
index ff5300859edf498c7f2fb27c4ed6b65094a68ab5..455b537f958be3973abd83170ded68afc8236ae1 100644 (file)
@@ -103,7 +103,7 @@ public class MessageIntelligenceAgencyImpl implements MessageIntelligenceAgency,
         // log current counters and cleans it
         if (LOG.isDebugEnabled()) {
             for (String counterItem : provideIntelligence()) {
-                LOG.debug(counterItem);
+                LOG.debug("Counter: {}", counterItem);
             }
         }
     }
index 46828cc205ed818d759a093e99950272ac22ec00..55728a29148a79087ed1c43660c12efbc5c91800 100644 (file)
@@ -78,7 +78,7 @@ public class FlowRemovedTranslator implements MessageTranslator
     }
 
     private RemovedFlowReason translateReason(FlowRemoved removedFlow) {
-        LOG.debug("--Entering translateReason within FlowRemovedTranslator with reason:{} " + removedFlow.getReason());
+        LOG.debug("--Entering translateReason within FlowRemovedTranslator with reason: {}", removedFlow.getReason());
         switch (removedFlow.getReason()) {
             case OFPRRIDLETIMEOUT:
                 return RemovedFlowReason.OFPRRIDLETIMEOUT;
index 991fe8f101c167b5a606238cdbb17ecca32bc8fc..4b55403e0c7b405d46a59710c915024273ba999c 100644 (file)
@@ -30,7 +30,6 @@
     </scm>
 
     <properties>
-        <project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
         <exi.nagasena.version>0000.0002.0053.0</exi.nagasena.version>
         <infrautils.version>1.5.0-SNAPSHOT</infrautils.version>
         <serviceutils.version>0.3.0-SNAPSHOT</serviceutils.version>