Enable checkstyle rule to catch inner assignments.
Turn on the checkstyle rule that catches assignemnts used as
expressions and fix the violations that it detects.
Change-Id: I8f0ddfdd401f247523e98d7359872a8b4a367106
diff --git a/src/main/java/net/onrc/onos/core/devicemanager/OnosDeviceManager.java b/src/main/java/net/onrc/onos/core/devicemanager/OnosDeviceManager.java
index 48e23eb..30ad722 100644
--- a/src/main/java/net/onrc/onos/core/devicemanager/OnosDeviceManager.java
+++ b/src/main/java/net/onrc/onos/core/devicemanager/OnosDeviceManager.java
@@ -132,8 +132,8 @@
}
//We check if it is the same device in datagrid to suppress the device update
- OnosDevice exDev = null;
- if ((exDev = mapDevice.get(mac)) != null) {
+ OnosDevice exDev = mapDevice.get(mac);
+ if (exDev != null) {
if (exDev.equals(srcDevice)) {
//There is the same existing device. Update only ActiveSince time.
exDev.setLastSeenTimestamp(new Date());