Sonar fixes

Rule: Use isEmpty() to check whether the collection is empty or not.

Change-Id: Ib5ab56b2263623b297db56c5cac2c2ee80e12725
diff --git a/protocols/isis/ctl/src/main/java/org/onosproject/isis/controller/impl/Controller.java b/protocols/isis/ctl/src/main/java/org/onosproject/isis/controller/impl/Controller.java
index 406d09c..ae9504b 100644
--- a/protocols/isis/ctl/src/main/java/org/onosproject/isis/controller/impl/Controller.java
+++ b/protocols/isis/ctl/src/main/java/org/onosproject/isis/controller/impl/Controller.java
@@ -127,7 +127,7 @@
         configPacket[1] = numberOfInterface;
         //First time configuration
         if (processes == null) {
-            if (isisProcesses.size() > 0) {
+            if (!isisProcesses.isEmpty()) {
                 processes = isisProcesses;
                 connectPeer();
             }
@@ -337,7 +337,7 @@
                 }
                 interfaceList.add(isisInterface);
             }
-            if (interfaceList.size() > 0) {
+            if (!interfaceList.isEmpty()) {
                 IsisProcess process = new DefaultIsisProcess();
                 process.setProcessId(jsonNode.path(IsisConstants.PROCESSESID).asText());
                 process.setIsisInterfaceList(interfaceList);
diff --git a/protocols/isis/ctl/src/main/java/org/onosproject/isis/controller/impl/IsisMessageDecoder.java b/protocols/isis/ctl/src/main/java/org/onosproject/isis/controller/impl/IsisMessageDecoder.java
index b75bc3f..43d95d8 100644
--- a/protocols/isis/ctl/src/main/java/org/onosproject/isis/controller/impl/IsisMessageDecoder.java
+++ b/protocols/isis/ctl/src/main/java/org/onosproject/isis/controller/impl/IsisMessageDecoder.java
@@ -73,7 +73,7 @@
                 isisMessageList.add(message);
             }
         }
-        return (isisMessageList.size() > 0) ? isisMessageList : null;
+        return (!isisMessageList.isEmpty()) ? isisMessageList : null;
     }
 
     /**
diff --git a/protocols/isis/isisio/src/main/java/org/onosproject/isis/io/isispacket/tlv/NeighborForExtendedIs.java b/protocols/isis/isisio/src/main/java/org/onosproject/isis/io/isispacket/tlv/NeighborForExtendedIs.java
index f5cd03b..5c3bb2e 100644
--- a/protocols/isis/isisio/src/main/java/org/onosproject/isis/io/isispacket/tlv/NeighborForExtendedIs.java
+++ b/protocols/isis/isisio/src/main/java/org/onosproject/isis/io/isispacket/tlv/NeighborForExtendedIs.java
@@ -134,7 +134,7 @@
         List<Byte> byteList = new ArrayList<>();
         byteList.addAll(IsisUtil.sourceAndLanIdToBytes(this.neighborId()));
         byteList.addAll(Bytes.asList(IsisUtil.convertToThreeBytes(this.metric())));
-        if (this.teSubTlv.size() > 0) {
+        if (!this.teSubTlv.isEmpty()) {
             for (TrafficEngineeringSubTlv trafficEngineeringSubTlv : this.teSubTlv) {
                 byteList.addAll(SubTlvToBytes.tlvToBytes(trafficEngineeringSubTlv));
             }
diff --git a/protocols/isis/isisio/src/main/java/org/onosproject/isis/io/util/IsisUtil.java b/protocols/isis/isisio/src/main/java/org/onosproject/isis/io/util/IsisUtil.java
index 80bd083..a385376 100644
--- a/protocols/isis/isisio/src/main/java/org/onosproject/isis/io/util/IsisUtil.java
+++ b/protocols/isis/isisio/src/main/java/org/onosproject/isis/io/util/IsisUtil.java
@@ -423,7 +423,7 @@
         adjacencyStateTlv.setAdjacencyType((byte) IsisInterfaceState.DOWN.value());
         adjacencyStateTlv.setLocalCircuitId(Integer.parseInt(isisInterface.circuitId()));
         Set<MacAddress> neighbors = isisInterface.neighbors();
-        if (neighbors.size() > 0) {
+        if (!neighbors.isEmpty()) {
             IsisNeighbor neighbor = isisInterface.lookup(neighbors.iterator().next());
             adjacencyStateTlv.setAdjacencyType((byte) neighbor.interfaceState().value());
             adjacencyStateTlv.setNeighborSystemId(neighbor.neighborSystemId());
@@ -509,7 +509,7 @@
         areaAddressTlv.addAddress(isisInterface.areaAddress());
         l1L2HelloPdu.addTlv(areaAddressTlv);
         Set<MacAddress> neighbors = isisInterface.neighbors();
-        if (neighbors.size() > 0) {
+        if (!neighbors.isEmpty()) {
             List<MacAddress> neighborMacs = new ArrayList<>();
             for (MacAddress neighbor : neighbors) {
                 IsisNeighbor isisNeighbor = isisInterface.lookup(neighbor);