diff --git a/apps/faultmanagement/fmmgr/src/test/java/org/onosproject/faultmanagement/impl/PollingAlarmProviderTest.java b/apps/faultmanagement/fmmgr/src/test/java/org/onosproject/faultmanagement/impl/PollingAlarmProviderTest.java
index 3074dd5..b96af16 100644
--- a/apps/faultmanagement/fmmgr/src/test/java/org/onosproject/faultmanagement/impl/PollingAlarmProviderTest.java
+++ b/apps/faultmanagement/fmmgr/src/test/java/org/onosproject/faultmanagement/impl/PollingAlarmProviderTest.java
@@ -298,7 +298,7 @@
 
         @Override
         public Object get(Object key) {
-            if (key.equals("pollFrequency")) {
+            if ("pollFrequency".equals(key)) {
                 return "1";
             }
             return null;
diff --git a/apps/newoptical/src/main/java/org/onosproject/newoptical/OpticalPathProvisioner.java b/apps/newoptical/src/main/java/org/onosproject/newoptical/OpticalPathProvisioner.java
index 944d3b6..65499f4 100644
--- a/apps/newoptical/src/main/java/org/onosproject/newoptical/OpticalPathProvisioner.java
+++ b/apps/newoptical/src/main/java/org/onosproject/newoptical/OpticalPathProvisioner.java
@@ -626,7 +626,7 @@
 
         // short-term hack for ONS'17 time-frame,
         // only expect OF device to have link discovery.
-        return cp.deviceId().uri().getScheme().equals("of");
+        return "of".equals(cp.deviceId().uri().getScheme());
     }
 
     /**
diff --git a/apps/optical/src/main/java/org/onosproject/optical/OpticalLinkProvider.java b/apps/optical/src/main/java/org/onosproject/optical/OpticalLinkProvider.java
index b198027..1e32592 100644
--- a/apps/optical/src/main/java/org/onosproject/optical/OpticalLinkProvider.java
+++ b/apps/optical/src/main/java/org/onosproject/optical/OpticalLinkProvider.java
@@ -110,7 +110,7 @@
         public void event(LinkEvent event) {
             if (event.type() == LinkEvent.Type.LINK_ADDED) {
                 Link link = event.subject();
-                if (link.providerId().scheme().equals("cfg")) {
+                if ("cfg".equals(link.providerId().scheme())) {
                     processLink(event.subject());
                 }
             }
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/cli/PolicyAddCommand.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/cli/PolicyAddCommand.java
index 14694a9..b3b995a 100644
--- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/cli/PolicyAddCommand.java
+++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/cli/PolicyAddCommand.java
@@ -99,7 +99,7 @@
         if (dstPort != 0) {
             tpb.setDstPort(dstPort);
         }
-        if (!proto.equals("ip")) {
+        if (!"ip".equals(proto)) {
             tpb.setIpProto(proto);
         }
         if (Policy.Type.valueOf(policyType) == Policy.Type.TUNNEL_FLOW) {
diff --git a/apps/vtn/sfcmgr/src/main/java/org/onosproject/sfc/installer/impl/SfcFlowRuleInstallerImpl.java b/apps/vtn/sfcmgr/src/main/java/org/onosproject/sfc/installer/impl/SfcFlowRuleInstallerImpl.java
index 52ecde6..2d1bae6 100644
--- a/apps/vtn/sfcmgr/src/main/java/org/onosproject/sfc/installer/impl/SfcFlowRuleInstallerImpl.java
+++ b/apps/vtn/sfcmgr/src/main/java/org/onosproject/sfc/installer/impl/SfcFlowRuleInstallerImpl.java
@@ -697,11 +697,11 @@
         }
 
         if ((flowClassifier.protocol() != null) && (!flowClassifier.protocol().isEmpty())) {
-            if (flowClassifier.protocol().equalsIgnoreCase("TCP")) {
+            if ("TCP".equalsIgnoreCase(flowClassifier.protocol())) {
                 selector.add(Criteria.matchIPProtocol(IPv4.PROTOCOL_TCP));
-            } else if (flowClassifier.protocol().equalsIgnoreCase("UDP")) {
+            } else if ("UDP".equalsIgnoreCase(flowClassifier.protocol())) {
                 selector.add(Criteria.matchIPProtocol(IPv4.PROTOCOL_UDP));
-            } else if (flowClassifier.protocol().equalsIgnoreCase("ICMP")) {
+            } else if ("ICMP".equalsIgnoreCase(flowClassifier.protocol())) {
                 selector.add(Criteria.matchIPProtocol(IPv4.PROTOCOL_ICMP));
             }
         } else if (fiveTuple != null && fiveTuple.protocol() != 0) {
@@ -709,8 +709,8 @@
         }
 
         if (((flowClassifier.etherType() != null) && (!flowClassifier.etherType().isEmpty()))
-                && (flowClassifier.etherType().equals("IPv4") || flowClassifier.etherType().equals("IPv6"))) {
-            if (flowClassifier.etherType().equals("IPv4")) {
+                && ("IPv4".equals(flowClassifier.etherType()) || "IPv6".equals(flowClassifier.etherType()))) {
+            if ("IPv4".equals(flowClassifier.etherType())) {
                 selector.matchEthType(Ethernet.TYPE_IPV4);
             } else {
                 selector.matchEthType(Ethernet.TYPE_IPV6);
diff --git a/apps/vtn/sfcmgr/src/main/java/org/onosproject/sfc/manager/impl/SfcManager.java b/apps/vtn/sfcmgr/src/main/java/org/onosproject/sfc/manager/impl/SfcManager.java
index eb63917..d429fc9 100644
--- a/apps/vtn/sfcmgr/src/main/java/org/onosproject/sfc/manager/impl/SfcManager.java
+++ b/apps/vtn/sfcmgr/src/main/java/org/onosproject/sfc/manager/impl/SfcManager.java
@@ -407,11 +407,11 @@
                     boolean match = false;
                     // Check whether protocol is set in flow classifier
                     if (flowClassifier.protocol() != null) {
-                        if ((flowClassifier.protocol().equalsIgnoreCase("TCP")
+                        if (("TCP".equalsIgnoreCase(flowClassifier.protocol())
                                 && fiveTuple.protocol() == IPv4.PROTOCOL_TCP)
-                                || (flowClassifier.protocol().equalsIgnoreCase("UDP")
+                                || ("UDP".equalsIgnoreCase(flowClassifier.protocol())
                                         && fiveTuple.protocol() == IPv4.PROTOCOL_UDP)
-                                        || (flowClassifier.protocol().equalsIgnoreCase("ICMP")
+                                        || ("ICMP".equalsIgnoreCase(flowClassifier.protocol())
                                                 && fiveTuple.protocol() == IPv4.PROTOCOL_ICMP)) {
                             match = true;
                         } else {
diff --git a/apps/vtn/vtnmgr/src/main/java/org/onosproject/vtn/manager/impl/VtnManager.java b/apps/vtn/vtnmgr/src/main/java/org/onosproject/vtn/manager/impl/VtnManager.java
index f1fcbbc..cb44b5d 100644
--- a/apps/vtn/vtnmgr/src/main/java/org/onosproject/vtn/manager/impl/VtnManager.java
+++ b/apps/vtn/vtnmgr/src/main/java/org/onosproject/vtn/manager/impl/VtnManager.java
@@ -644,7 +644,7 @@
         Subnet subnet = subnetService.getSubnet(subnetId);
         String deviceOwner = virtualPort.deviceOwner();
         if (deviceOwner != null) {
-            if (deviceOwner.equalsIgnoreCase("network:dhcp")) {
+            if ("network:dhcp".equalsIgnoreCase(deviceOwner)) {
                 Sets.newHashSet(devices).stream()
                         .filter(d -> d.type() == Device.Type.SWITCH)
                         .forEach(d -> {
diff --git a/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/resources/TenantNetworkWebResource.java b/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/resources/TenantNetworkWebResource.java
index 026a8ac..200ce09 100644
--- a/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/resources/TenantNetworkWebResource.java
+++ b/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/resources/TenantNetworkWebResource.java
@@ -123,13 +123,13 @@
     }
 
     private State isState(String state) {
-        if (state.equals("ACTIVE")) {
+        if ("ACTIVE".equals(state)) {
             return TenantNetwork.State.ACTIVE;
-        } else if (state.equals("BUILD")) {
+        } else if ("BUILD".equals(state)) {
             return TenantNetwork.State.BUILD;
-        } else if (state.equals("DOWN")) {
+        } else if ("DOWN".equals(state)) {
             return TenantNetwork.State.DOWN;
-        } else if (state.equals("ERROR")) {
+        } else if ("ERROR".equals(state)) {
             return TenantNetwork.State.ERROR;
         } else {
             return null;
@@ -137,7 +137,7 @@
     }
 
     private Type isType(String type) {
-        if (type.equals("LOCAL")) {
+        if ("LOCAL".equals(type)) {
             return TenantNetwork.Type.LOCAL;
         } else {
             return null;
@@ -286,7 +286,7 @@
         String segmentationIdStr = node.get("provider:segmentation_id").asText();
         SegmentationId segmentationId = SegmentationId.segmentationId(segmentationIdStr);
         TenantId tenantId = TenantId.tenantId(tenantIdStr);
-        if (segmentationIdStr == null || segmentationIdStr.equals("null")) {
+        if (segmentationIdStr == null || "null".equals(segmentationIdStr)) {
             segmentationId = get(VtnRscService.class).getL3vni(tenantId);
         }
         TenantNetworkId id = null;
@@ -337,7 +337,7 @@
             String segmentationIdStr = node.get("provider:segmentation_id").asText();
             SegmentationId segmentationId = SegmentationId.segmentationId(segmentationIdStr);
             TenantId tenantId = TenantId.tenantId(tenantIdStr);
-            if (segmentationIdStr == null || segmentationIdStr.equals("null")) {
+            if (segmentationIdStr == null || "null".equals(segmentationIdStr)) {
                 segmentationId = get(VtnRscService.class).getL3vni(tenantId);
             }
             network = new DefaultTenantNetwork(
diff --git a/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/resources/VirtualPortWebResource.java b/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/resources/VirtualPortWebResource.java
index 1e1cc79..af82f9b 100644
--- a/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/resources/VirtualPortWebResource.java
+++ b/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/resources/VirtualPortWebResource.java
@@ -387,7 +387,7 @@
      * @return the virtualPort state
      */
     private State isState(String state) {
-        if (state.equals("ACTIVE")) {
+        if ("ACTIVE".equals(state)) {
             return VirtualPort.State.ACTIVE;
         } else {
             return VirtualPort.State.DOWN;
diff --git a/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/web/FloatingIpCodec.java b/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/web/FloatingIpCodec.java
index cd61280..05cfaae 100644
--- a/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/web/FloatingIpCodec.java
+++ b/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/web/FloatingIpCodec.java
@@ -60,36 +60,36 @@
         Iterator<String> i = fields.iterator();
         while (i.hasNext()) {
             String s = i.next();
-            if (s.equals("floating_network_id")) {
+            if ("floating_network_id".equals(s)) {
                 result.put("floating_network_id", floatingIp.networkId()
                         .toString());
             }
-            if (s.equals("router_id")) {
+            if ("router_id".equals(s)) {
                 result.put("router_id",
                            floatingIp.routerId() == null ? null : floatingIp
                                    .routerId().routerId());
             }
-            if (s.equals("tenant_id")) {
+            if ("tenant_id".equals(s)) {
                 result.put("tenant_id", floatingIp.tenantId().toString());
             }
-            if (s.equals("port_id")) {
+            if ("port_id".equals(s)) {
                 result.put("port_id",
                            floatingIp.portId() == null ? null : floatingIp
                                    .portId().toString());
             }
-            if (s.equals("id")) {
+            if ("id".equals(s)) {
                 result.put("id", floatingIp.id().floatingIpId().toString());
             }
-            if (s.equals("fixed_ip_address")) {
+            if ("fixed_ip_address".equals(s)) {
                 result.put("fixed_ip_address",
                            floatingIp.fixedIp() == null ? null : floatingIp
                                    .fixedIp().toString());
             }
-            if (s.equals("floating_ip_address")) {
+            if ("floating_ip_address".equals(s)) {
                 result.put("floating_ip_address", floatingIp.floatingIp()
                         .toString());
             }
-            if (s.equals("status")) {
+            if ("status".equals(s)) {
                 result.put("status", floatingIp.status().toString());
             }
         }
diff --git a/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/web/FlowClassifierCodec.java b/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/web/FlowClassifierCodec.java
index e4d4b93..c760c9c 100644
--- a/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/web/FlowClassifierCodec.java
+++ b/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/web/FlowClassifierCodec.java
@@ -75,12 +75,12 @@
         String etherType = nullIsIllegal(json.get(ETHER_TYPE), ETHER_TYPE + MISSING_MEMBER_MESSAGE).asText();
         resultBuilder.setEtherType(etherType);
 
-        if (json.get(PROTOCOL) != null && !(json.get(PROTOCOL)).asText().equals("null")) {
+        if (json.get(PROTOCOL) != null && !"null".equals((json.get(PROTOCOL)).asText())) {
             String protocol = (json.get(PROTOCOL)).asText();
             resultBuilder.setProtocol(protocol);
         }
 
-        if (json.get(PRIORITY) != null && !(json.get(PRIORITY)).asText().equals("null")) {
+        if (json.get(PRIORITY) != null && !"null".equals((json.get(PRIORITY)).asText())) {
             int priority = (json.get(PRIORITY)).asInt();
             resultBuilder.setPriority(priority);
         }
@@ -97,22 +97,22 @@
         int maxDstPortRange = (json.get(MAX_DST_PORT_RANGE)).asInt();
         resultBuilder.setMaxDstPortRange(maxDstPortRange);
 
-        if (json.get(SRC_IP_PREFIX) != null && !(json.get(SRC_IP_PREFIX)).asText().equals("null")) {
+        if (json.get(SRC_IP_PREFIX) != null && !"null".equals((json.get(SRC_IP_PREFIX)).asText())) {
             String srcIpPrefix = (json.get(SRC_IP_PREFIX)).asText();
             resultBuilder.setSrcIpPrefix(IpPrefix.valueOf(srcIpPrefix));
         }
 
-        if (json.get(DST_IP_PREFIX) != null && !(json.get(DST_IP_PREFIX)).asText().equals("null")) {
+        if (json.get(DST_IP_PREFIX) != null && !"null".equals((json.get(DST_IP_PREFIX)).asText())) {
             String dstIpPrefix = (json.get(DST_IP_PREFIX)).asText();
             resultBuilder.setDstIpPrefix(IpPrefix.valueOf(dstIpPrefix));
         }
 
-        if (json.get(SRC_PORT) != null && !(json.get(SRC_PORT)).asText().equals("null")) {
+        if (json.get(SRC_PORT) != null && !"null".equals((json.get(SRC_PORT)).asText())) {
             String srcPort = (json.get(SRC_PORT)).asText();
             resultBuilder.setSrcPort(VirtualPortId.portId(srcPort));
         }
 
-        if (json.get(DST_PORT) != null && !(json.get(DST_PORT)).asText().equals("null")) {
+        if (json.get(DST_PORT) != null && !"null".equals((json.get(DST_PORT)).asText())) {
             String dstPort = (json.get(DST_PORT)).asText();
             resultBuilder.setDstPort(VirtualPortId.portId(dstPort));
         }
diff --git a/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/web/RouterCodec.java b/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/web/RouterCodec.java
index b6819b2..b602108 100644
--- a/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/web/RouterCodec.java
+++ b/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/web/RouterCodec.java
@@ -59,26 +59,26 @@
         Iterator<String> i = fields.iterator();
         while (i.hasNext()) {
             String s = i.next();
-            if (s.equals("id")) {
+            if ("id".equals(s)) {
                 result.put("id", router.id().routerId());
             }
-            if (s.equals("status")) {
+            if ("status".equals(s)) {
                 result.put("status", router.status().toString());
             }
-            if (s.equals("name")) {
+            if ("name".equals(s)) {
                 result.put("name", router.name().toString());
             }
-            if (s.equals("admin_state_up")) {
+            if ("admin_state_up".equals(s)) {
                 result.put("admin_state_up", router.adminStateUp());
             }
-            if (s.equals("tenant_id")) {
+            if ("tenant_id".equals(s)) {
                 result.put("tenant_id", router.tenantId().toString());
             }
-            if (s.equals("routes")) {
+            if ("routes".equals(s)) {
                 result.put("routes", router.routes() == null ? null : router
                         .routes().toString());
             }
-            if (s.equals("external_gateway_info")) {
+            if ("external_gateway_info".equals(s)) {
                 result.set("external_gateway_info",
                            router.externalGatewayInfo() == null ? null
                                                                : new RouterGatewayInfoCodec()
diff --git a/apps/yang/src/main/java/org/onosproject/yang/YangRuntimeManager.java b/apps/yang/src/main/java/org/onosproject/yang/YangRuntimeManager.java
index a18a0af..b1867f6 100644
--- a/apps/yang/src/main/java/org/onosproject/yang/YangRuntimeManager.java
+++ b/apps/yang/src/main/java/org/onosproject/yang/YangRuntimeManager.java
@@ -148,7 +148,7 @@
         checkNotNull(resourceId, " resource id can't be null.");
         NodeKey key = resourceId.nodeKeys().get(0);
         if (resourceId.nodeKeys().size() == 1 &&
-                key.schemaId().name().equals("/")) {
+                "/".equals(key.schemaId().name())) {
             return modelRegistry;
         }
         log.info("To be implemented.");
diff --git a/apps/yms/app/src/main/java/org/onosproject/yms/app/ych/defaultcodecs/xml/DefaultXmlCodec.java b/apps/yms/app/src/main/java/org/onosproject/yms/app/ych/defaultcodecs/xml/DefaultXmlCodec.java
index dd78ab5..2cd6710 100644
--- a/apps/yms/app/src/main/java/org/onosproject/yms/app/ych/defaultcodecs/xml/DefaultXmlCodec.java
+++ b/apps/yms/app/src/main/java/org/onosproject/yms/app/ych/defaultcodecs/xml/DefaultXmlCodec.java
@@ -84,7 +84,7 @@
             rootElement.add(Namespace.get(rootNode.getNamespace()));
         }
 
-        if (rootElement.getName().equals("config")) {
+        if ("config".equals(rootElement.getName())) {
             rootElement.add(new Namespace("nc", "urn:ietf:params:xml:ns:netconf:base:1.0"));
         }
 
diff --git a/apps/yms/app/src/main/java/org/onosproject/yms/app/yob/YobUtils.java b/apps/yms/app/src/main/java/org/onosproject/yms/app/yob/YobUtils.java
index 54bb37f..76339b8 100644
--- a/apps/yms/app/src/main/java/org/onosproject/yms/app/yob/YobUtils.java
+++ b/apps/yms/app/src/main/java/org/onosproject/yms/app/yob/YobUtils.java
@@ -134,7 +134,7 @@
                 break;
 
             case EMPTY:
-                if (leafValue == null || leafValue.equals("")) {
+                if (leafValue == null || "".equals(leafValue)) {
                     parentSetterMethod.invoke(parentBuilderObject, true);
                 } else {
                     log.info(E_INVALID_EMPTY_DATA);
diff --git a/apps/yms/app/src/main/java/org/onosproject/yms/app/ytb/YdtBuilderFromYo.java b/apps/yms/app/src/main/java/org/onosproject/yms/app/ytb/YdtBuilderFromYo.java
index 4faa58b..76b1647 100644
--- a/apps/yms/app/src/main/java/org/onosproject/yms/app/ytb/YdtBuilderFromYo.java
+++ b/apps/yms/app/src/main/java/org/onosproject/yms/app/ytb/YdtBuilderFromYo.java
@@ -800,7 +800,7 @@
                 }
                 break;
             }
-            if (!val.equals("")) {
+            if (!"".equals(val)) {
                 leafListVal.add(val);
             }
         }
diff --git a/apps/yms/ut/src/test/java/org/onosproject/yms/app/ych/DefaultYangCodecHandlerTest.java b/apps/yms/ut/src/test/java/org/onosproject/yms/app/ych/DefaultYangCodecHandlerTest.java
index 500f180..802d0bd 100644
--- a/apps/yms/ut/src/test/java/org/onosproject/yms/app/ych/DefaultYangCodecHandlerTest.java
+++ b/apps/yms/ut/src/test/java/org/onosproject/yms/app/ych/DefaultYangCodecHandlerTest.java
@@ -1251,8 +1251,7 @@
         Iterator<Object> iterator = objectList.iterator();
         while (iterator.hasNext()) {
             Object object = iterator.next();
-            if (object.getClass().getSimpleName()
-                    .equals("LogisticsManagerOpParam")) {
+            if ("LogisticsManagerOpParam".equals(object.getClass().getSimpleName())) {
                 LogisticsManagerOpParam logisticsManagerOpParam =
                         (LogisticsManagerOpParam) object;
                 assertEquals(AM_OBJ + "purchasing-spec: leaf value", "bcd",
diff --git a/apps/yms/ut/src/test/java/org/onosproject/yms/app/yob/YobListTest.java b/apps/yms/ut/src/test/java/org/onosproject/yms/app/yob/YobListTest.java
index 4f30ca2..95ecb7d 100644
--- a/apps/yms/ut/src/test/java/org/onosproject/yms/app/yob/YobListTest.java
+++ b/apps/yms/ut/src/test/java/org/onosproject/yms/app/yob/YobListTest.java
@@ -54,8 +54,7 @@
                 (YdtExtendedContext) childCtx, YdtTestUtils.
                         getSchemaRegistry());
         assertNotNull(yangObject);
-        assertTrue(yangObject.getClass().getSimpleName()
-                           .equals("RootlistOpParam"));
+        assertTrue("RootlistOpParam".equals(yangObject.getClass().getSimpleName()));
         try {
 
             Field field =
@@ -99,8 +98,7 @@
                 (YdtExtendedContext) ydtContext1, YdtTestUtils
                         .getSchemaRegistry());
         assertNotNull(yangObject);
-        assertTrue(yangObject.getClass().getSimpleName()
-                           .equals("RootlistOpParam"));
+        assertTrue("RootlistOpParam".equals(yangObject.getClass().getSimpleName()));
         try {
 
             Field field = yangObject.getClass()
diff --git a/apps/yms/ut/src/test/java/org/onosproject/yms/app/yob/YobLogisticsManagerTest.java b/apps/yms/ut/src/test/java/org/onosproject/yms/app/yob/YobLogisticsManagerTest.java
index 8d3b5e3..30b889d 100644
--- a/apps/yms/ut/src/test/java/org/onosproject/yms/app/yob/YobLogisticsManagerTest.java
+++ b/apps/yms/ut/src/test/java/org/onosproject/yms/app/yob/YobLogisticsManagerTest.java
@@ -48,7 +48,7 @@
                     (YdtExtendedContext) childCtx, YdtTestUtils
                             .getSchemaRegistry());
             Class<?> aClass = yangObject.getClass();
-            if (aClass.getSimpleName().equals("CustomssupervisorOpParam")) {
+            if ("CustomssupervisorOpParam".equals(aClass.getSimpleName())) {
                 try {
                     Field field = aClass.getDeclaredField("supervisor");
                     Field onosYangNodeOperationType = aClass
@@ -67,8 +67,7 @@
                 }
             }
 
-            if (aClass.getSimpleName().equals(
-                    "MerchandisersupervisorOpParam")) {
+            if ("MerchandisersupervisorOpParam".equals(aClass.getSimpleName())) {
                 try {
                     Field field = aClass.getDeclaredField("supervisor");
                     field.setAccessible(true);
@@ -82,7 +81,7 @@
                 }
             }
 
-            if (aClass.getSimpleName().equals("WarehousesupervisorOpParam")) {
+            if ("WarehousesupervisorOpParam".equals(aClass.getSimpleName())) {
                 try {
                     Field field = aClass.getDeclaredField("supervisor");
                     field.setAccessible(true);
diff --git a/cli/src/main/java/org/onosproject/cli/app/ApplicationCommand.java b/cli/src/main/java/org/onosproject/cli/app/ApplicationCommand.java
index 51bb9db..c9d8f08 100644
--- a/cli/src/main/java/org/onosproject/cli/app/ApplicationCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/app/ApplicationCommand.java
@@ -70,7 +70,7 @@
     // Installs the application from input of the specified URL
     private boolean installApp(ApplicationAdminService service, String url) {
         try {
-            if (url.equals("-")) {
+            if ("-".equals(url)) {
                 service.install(System.in);
             } else {
                 service.install(new URL(url).openStream());
diff --git a/cli/src/main/java/org/onosproject/cli/app/ApplicationNameCompleter.java b/cli/src/main/java/org/onosproject/cli/app/ApplicationNameCompleter.java
index be921cc..f8d86f1 100644
--- a/cli/src/main/java/org/onosproject/cli/app/ApplicationNameCompleter.java
+++ b/cli/src/main/java/org/onosproject/cli/app/ApplicationNameCompleter.java
@@ -63,9 +63,9 @@
 //            if (previousApps.contains(app.id().name())) {
 //                continue;
 //            }
-            if (cmd.equals("uninstall") ||
-                    (cmd.equals("activate") && state == INSTALLED) ||
-                    (cmd.equals("deactivate") && state == ACTIVE)) {
+            if ("uninstall".equals(cmd) ||
+                    ("activate".equals(cmd) && state == INSTALLED) ||
+                    ("deactivate".equals(cmd) && state == ACTIVE)) {
                 strings.add(app.id().name());
             }
         }
diff --git a/cli/src/main/java/org/onosproject/cli/net/DevicePortStateCommand.java b/cli/src/main/java/org/onosproject/cli/net/DevicePortStateCommand.java
index 798166e..c49f23e 100644
--- a/cli/src/main/java/org/onosproject/cli/net/DevicePortStateCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/DevicePortStateCommand.java
@@ -59,9 +59,9 @@
             print(" %s", "Port does not exist");
             return;
         }
-        if (portState.equals("enable")) {
+        if ("enable".equals(portState)) {
             deviceAdminService.changePortState(dev.id(), pnum, true);
-        } else if (portState.equals("disable")) {
+        } else if ("disable".equals(portState)) {
             deviceAdminService.changePortState(dev.id(), pnum, false);
         } else {
             print(" %s", "State must be enable or disable");
diff --git a/cli/src/main/java/org/onosproject/cli/net/DpisListCommand.java b/cli/src/main/java/org/onosproject/cli/net/DpisListCommand.java
index 85c2dda..0533652 100644
--- a/cli/src/main/java/org/onosproject/cli/net/DpisListCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/DpisListCommand.java
@@ -214,7 +214,7 @@
 
     private void printDpiStatisticsJson(int number, DpiStatistics ds) {
         String index = number < 0 ? String.format("  -  ") : String.format("%5d", number);
-        if (ds.receivedTime().equals("")) {
+        if ("".equals(ds.receivedTime())) {
             print("ReceivedTime is null, No valid DPI Statistics!");
             return;
         }
@@ -233,7 +233,7 @@
             return;
         }
 
-        if (ds.receivedTime().equals("")) {
+        if ("".equals(ds.receivedTime())) {
             print("ReceivedTime is null, No valid DPI Statistics!");
             return;
         }
@@ -359,7 +359,7 @@
         sb.append(String.format(" [%s pkts/", fsi.packets()));
         sb.append(String.format("%s bytes]", fsi.bytes()));
         String serverHostName = fsi.hostServerName();
-        if (serverHostName != null && !serverHostName.equals("")) {
+        if (serverHostName != null && !"".equals(serverHostName)) {
             sb.append(String.format("[Host: %s]", serverHostName));
         }
 
diff --git a/cli/src/main/java/org/onosproject/cli/net/FlowsListCommand.java b/cli/src/main/java/org/onosproject/cli/net/FlowsListCommand.java
index 7cbd586..c417ddc 100644
--- a/cli/src/main/java/org/onosproject/cli/net/FlowsListCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/FlowsListCommand.java
@@ -163,7 +163,7 @@
             try {
                 response = br.readLine();
                 response = response.trim().replace("\n", "");
-                if (response.equals("y")) {
+                if ("y".equals(response)) {
                     flowService.removeFlowRules(flow);
                 }
             } catch (IOException e) {
diff --git a/cli/src/main/java/org/onosproject/cli/net/GetFlowStatisticsCommand.java b/cli/src/main/java/org/onosproject/cli/net/GetFlowStatisticsCommand.java
index 6d9ff67..bb41497 100644
--- a/cli/src/main/java/org/onosproject/cli/net/GetFlowStatisticsCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/GetFlowStatisticsCommand.java
@@ -252,15 +252,15 @@
     private FlowEntry.FlowLiveType getFlowLiveType(String liveType) {
         String liveTypeUC = liveType.toUpperCase();
 
-        if (liveTypeUC.equals("IMMEDIATE")) {
+        if ("IMMEDIATE".equals(liveTypeUC)) {
             return FlowEntry.FlowLiveType.IMMEDIATE;
-        } else if (liveTypeUC.equals("SHORT")) {
+        } else if ("SHORT".equals(liveTypeUC)) {
             return FlowEntry.FlowLiveType.SHORT;
-        } else if (liveTypeUC.equals("MID")) {
+        } else if ("MID".equals(liveTypeUC)) {
             return FlowEntry.FlowLiveType.MID;
-        } else if (liveTypeUC.equals("LONG")) {
+        } else if ("LONG".equals(liveTypeUC)) {
             return FlowEntry.FlowLiveType.LONG;
-        } else if (liveTypeUC.equals("UNKNOWN")) {
+        } else if ("UNKNOWN".equals(liveTypeUC)) {
             return FlowEntry.FlowLiveType.UNKNOWN;
         } else {
             return null; // flow live type error
@@ -276,19 +276,19 @@
     private Instruction.Type getInstructionType(String instType) {
         String instTypeUC = instType.toUpperCase();
 
-        if (instTypeUC.equals("OUTPUT")) {
+        if ("OUTPUT".equals(instTypeUC)) {
             return Instruction.Type.OUTPUT;
-        } else if (instTypeUC.equals("GROUP")) {
+        } else if ("GROUP".equals(instTypeUC)) {
             return Instruction.Type.GROUP;
-        } else if (instTypeUC.equals("L0MODIFICATION")) {
+        } else if ("L0MODIFICATION".equals(instTypeUC)) {
             return Instruction.Type.L0MODIFICATION;
-        } else if (instTypeUC.equals("L2MODIFICATION")) {
+        } else if ("L2MODIFICATION".equals(instTypeUC)) {
             return Instruction.Type.L2MODIFICATION;
-        } else if (instTypeUC.equals("TABLE")) {
+        } else if ("TABLE".equals(instTypeUC)) {
             return Instruction.Type.TABLE;
-        } else if (instTypeUC.equals("L3MODIFICATION")) {
+        } else if ("L3MODIFICATION".equals(instTypeUC)) {
             return Instruction.Type.L3MODIFICATION;
-        } else if (instTypeUC.equals("METADATA")) {
+        } else if ("METADATA".equals(instTypeUC)) {
             return Instruction.Type.METADATA;
         } else {
              return null; // instruction type error
diff --git a/cli/src/main/java/org/onosproject/cli/net/GroupsListCommand.java b/cli/src/main/java/org/onosproject/cli/net/GroupsListCommand.java
index 8c9cfcf..610a6bf 100644
--- a/cli/src/main/java/org/onosproject/cli/net/GroupsListCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/GroupsListCommand.java
@@ -104,7 +104,7 @@
                 new TreeMap<>(Comparators.ELEMENT_COMPARATOR);
         List<Group> groups;
         GroupState s = null;
-        if (state != null && !state.equals("any")) {
+        if (!"any".equals(state)) {
             s = GroupState.valueOf(state.toUpperCase());
         }
         Iterable<Device> devices = deviceService.getDevices();
diff --git a/cli/src/main/java/org/onosproject/cli/net/IntentRemoveCommand.java b/cli/src/main/java/org/onosproject/cli/net/IntentRemoveCommand.java
index 741de20..7e28afb 100644
--- a/cli/src/main/java/org/onosproject/cli/net/IntentRemoveCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/IntentRemoveCommand.java
@@ -106,7 +106,7 @@
             try {
                 response = br.readLine();
                 response = response.trim().replace("\n", "");
-                if (response.equals("y")) {
+                if ("y".equals(response)) {
                     this.purgeIntents(ImmutableList.of(intent));
                 }
             } catch (IOException e) {
diff --git a/cli/src/main/java/org/onosproject/cli/net/McastDeleteCommand.java b/cli/src/main/java/org/onosproject/cli/net/McastDeleteCommand.java
index aa026ed..f2658c8 100644
--- a/cli/src/main/java/org/onosproject/cli/net/McastDeleteCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/McastDeleteCommand.java
@@ -50,7 +50,7 @@
     protected void execute() {
         MulticastRouteService mcastRouteManager = get(MulticastRouteService.class);
 
-        if (sAddr.equals("*") && gAddr.equals("*")) {
+        if ("*".equals(sAddr) && "*".equals(gAddr)) {
             // Clear all routes
             mcastRouteManager.getRoutes().forEach(mcastRouteManager::remove);
             return;
diff --git a/cli/src/main/java/org/onosproject/cli/net/RegionUpdateCommand.java b/cli/src/main/java/org/onosproject/cli/net/RegionUpdateCommand.java
index 7ea9ec6..f0887fa 100644
--- a/cli/src/main/java/org/onosproject/cli/net/RegionUpdateCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/RegionUpdateCommand.java
@@ -78,7 +78,7 @@
         List<Set<NodeId>> masters = Lists.newArrayList();
         Set<NodeId> nodeIds = Sets.newHashSet();
         for (String masterArg : masterArgs) {
-            if (masterArg.equals("/")) {
+            if ("/".equals(masterArg)) {
                 masters.add(nodeIds);
                 nodeIds = Sets.newHashSet();
             } else {
diff --git a/cli/src/main/java/org/onosproject/cli/security/ReviewCommand.java b/cli/src/main/java/org/onosproject/cli/security/ReviewCommand.java
index 9ce99be..0ebd283 100644
--- a/cli/src/main/java/org/onosproject/cli/security/ReviewCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/security/ReviewCommand.java
@@ -62,7 +62,7 @@
         if (accept == null) {
             smService.review(appId);
             printPolicy(smService, app);
-        } else if (accept.trim().equals("accept")) {
+        } else if ("accept".equals(accept.trim())) {
             smService.acceptPolicy(appId);
             printPolicy(smService, app);
         } else {
diff --git a/core/api/src/main/java/org/onosproject/net/driver/XmlDriverLoader.java b/core/api/src/main/java/org/onosproject/net/driver/XmlDriverLoader.java
index 30d1875..a496af1 100644
--- a/core/api/src/main/java/org/onosproject/net/driver/XmlDriverLoader.java
+++ b/core/api/src/main/java/org/onosproject/net/driver/XmlDriverLoader.java
@@ -147,7 +147,7 @@
         String name = driverCfg.getString(NAME);
         String parentsString = driverCfg.getString(EXTENDS, "");
         List<Driver> parents = Lists.newArrayList();
-        if (!parentsString.equals("")) {
+        if (!"".equals(parentsString)) {
             List<String> parentsNames;
             if (parentsString.contains(",")) {
                 parentsNames = Arrays.asList(parentsString.replace(" ", "").split(","));
diff --git a/core/api/src/test/java/org/onosproject/net/driver/XmlDriverLoaderTest.java b/core/api/src/test/java/org/onosproject/net/driver/XmlDriverLoaderTest.java
index 03f18af..5e26fcb 100644
--- a/core/api/src/test/java/org/onosproject/net/driver/XmlDriverLoaderTest.java
+++ b/core/api/src/test/java/org/onosproject/net/driver/XmlDriverLoaderTest.java
@@ -41,7 +41,7 @@
 
         Iterator<Driver> iterator = provider.getDrivers().iterator();
         Driver driver = iterator.next();
-        if (!driver.name().equals("foo.1")) {
+        if (!"foo.1".equals(driver.name())) {
             driver = iterator.next();
         }
 
@@ -87,7 +87,7 @@
         Driver driver;
         do {
             driver = iterator.next();
-        } while (!driver.name().equals("foo.2"));
+        } while (!"foo.2".equals(driver.name()));
         assertTrue("incorrect multiple behaviour inheritance", driver.hasBehaviour(TestBehaviour.class));
         assertTrue("incorrect multiple behaviour inheritance", driver.hasBehaviour(TestBehaviourTwo.class));
     }
@@ -101,14 +101,14 @@
         Driver driver;
         do {
             driver = iterator.next();
-        } while (!driver.name().equals("foo.2"));
+        } while (!"foo.2".equals(driver.name()));
         assertTrue("incorrect multiple behaviour inheritance", driver.hasBehaviour(TestBehaviour.class));
         Behaviour b2 = driver.createBehaviour(new DefaultDriverHandler(
                                                       new DefaultDriverData(
                                                               driver, DeviceId.deviceId("test_device"))),
                                               TestBehaviour.class);
-        assertTrue("incorrect multiple same behaviour inheritance", b2.getClass()
-                .getSimpleName().equals("TestBehaviourImpl2"));
+        assertTrue("incorrect multiple same behaviour inheritance",
+                   "TestBehaviourImpl2".equals(b2.getClass().getSimpleName()));
         assertTrue("incorrect multiple behaviour inheritance", driver.hasBehaviour(TestBehaviourTwo.class));
     }
 
diff --git a/core/common/src/test/java/org/onosproject/codec/impl/TrafficTreatmentCodecTest.java b/core/common/src/test/java/org/onosproject/codec/impl/TrafficTreatmentCodecTest.java
index 250b8bd..44f3b7e 100644
--- a/core/common/src/test/java/org/onosproject/codec/impl/TrafficTreatmentCodecTest.java
+++ b/core/common/src/test/java/org/onosproject/codec/impl/TrafficTreatmentCodecTest.java
@@ -114,7 +114,7 @@
             int counter = 0;
             for (int idx = 0; idx < node.size(); idx++) {
                 String type = node.get(idx).get("type").asText();
-                if (!type.equals("METER") && !type.equals("TABLE")) {
+                if (!"METER".equals(type) && !"TABLE".equals(type)) {
                     counter++;
                 }
             }
diff --git a/core/net/src/main/java/org/onosproject/cluster/impl/ClusterMetadataManager.java b/core/net/src/main/java/org/onosproject/cluster/impl/ClusterMetadataManager.java
index ce85758..416bbf14 100644
--- a/core/net/src/main/java/org/onosproject/cluster/impl/ClusterMetadataManager.java
+++ b/core/net/src/main/java/org/onosproject/cluster/impl/ClusterMetadataManager.java
@@ -131,7 +131,7 @@
         String metadataUri = System.getProperty("onos.cluster.metadata.uri");
         try {
             String protocol = metadataUri == null ? null : new URL(metadataUri).getProtocol();
-            if (protocol != null && (!protocol.equals("file") && !protocol.equals("http"))) {
+            if (!"file".equals(protocol) && !"http".equals(protocol)) {
                 return getProvider(protocol);
             }
             // file provider supports both "file" and "http" uris
diff --git a/core/net/src/main/java/org/onosproject/cluster/impl/ConfigFileBasedClusterMetadataProvider.java b/core/net/src/main/java/org/onosproject/cluster/impl/ConfigFileBasedClusterMetadataProvider.java
index 6db0365..706e286 100644
--- a/core/net/src/main/java/org/onosproject/cluster/impl/ConfigFileBasedClusterMetadataProvider.java
+++ b/core/net/src/main/java/org/onosproject/cluster/impl/ConfigFileBasedClusterMetadataProvider.java
@@ -166,10 +166,10 @@
     public boolean isAvailable() {
         try {
             URL url = new URL(metadataUrl);
-            if (url.getProtocol().equals("file")) {
+            if ("file".equals(url.getProtocol())) {
                 File file = new File(metadataUrl.replaceFirst("file://", ""));
                 return file.exists();
-            } else if (url.getProtocol().equals("http")) {
+            } else if ("http".equals(url.getProtocol())) {
                 try (InputStream file = url.openStream()) {
                     return true;
                 }
@@ -188,11 +188,11 @@
             URL url = new URL(metadataUrl);
             ClusterMetadata metadata = null;
             long version = 0;
-            if (url.getProtocol().equals("file")) {
+            if ("file".equals(url.getProtocol())) {
                 File file = new File(metadataUrl.replaceFirst("file://", ""));
                 version = file.lastModified();
                 metadata = mapper.readValue(new FileInputStream(file), ClusterMetadata.class);
-            } else if (url.getProtocol().equals("http")) {
+            } else if ("http".equals(url.getProtocol())) {
                 URLConnection conn = url.openConnection();
                 version = conn.getLastModified();
                 metadata = mapper.readValue(conn.getInputStream(), ClusterMetadata.class);
diff --git a/core/net/src/main/java/org/onosproject/cluster/impl/MastershipManager.java b/core/net/src/main/java/org/onosproject/cluster/impl/MastershipManager.java
index ae9dc16..c36ad62 100644
--- a/core/net/src/main/java/org/onosproject/cluster/impl/MastershipManager.java
+++ b/core/net/src/main/java/org/onosproject/cluster/impl/MastershipManager.java
@@ -128,7 +128,7 @@
     public void modified() {
         Set<ConfigProperty> configProperties = cfgService.getProperties(getClass().getCanonicalName());
         for (ConfigProperty property : configProperties) {
-            if (property.name().equals("useRegionForBalanceRoles")) {
+            if ("useRegionForBalanceRoles".equals(property.name())) {
                 useRegionForBalanceRoles = property.asBoolean();
             }
         }
diff --git a/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/DistributedClusterStore.java b/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/DistributedClusterStore.java
index e573b87..d727ebe 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/DistributedClusterStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/DistributedClusterStore.java
@@ -345,7 +345,7 @@
     private void readComponentConfiguration() {
         Set<ConfigProperty> configProperties = cfgService.getProperties(getClass().getName());
         for (ConfigProperty property : configProperties) {
-            if (property.name().equals("heartbeatInterval")) {
+            if ("heartbeatInterval".equals(property.name())) {
                 String s = property.value();
                 if (s == null) {
                     setHeartbeatInterval(DEFAULT_HEARTBEAT_INTERVAL);
@@ -362,7 +362,7 @@
                             heartbeatInterval);
                 }
             }
-            if (property.name().equals("phiFailureThreshold")) {
+            if ("phiFailureThreshold".equals(property.name())) {
                 String s = property.value();
                 if (s == null) {
                     setPhiFailureThreshold(DEFAULT_PHI_FAILURE_THRESHOLD);
diff --git a/core/store/dist/src/main/java/org/onosproject/store/device/impl/ECDeviceStore.java b/core/store/dist/src/main/java/org/onosproject/store/device/impl/ECDeviceStore.java
index 5776515..6aa9733 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/device/impl/ECDeviceStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/device/impl/ECDeviceStore.java
@@ -287,7 +287,7 @@
         } else {
             // Only forward for ConfigProvider
             // Forwarding was added as a workaround for ONOS-490
-            if (!providerId.scheme().equals("cfg")) {
+            if (!"cfg".equals(providerId.scheme())) {
                 return null;
             }
             DeviceInjectedEvent deviceInjectedEvent = new DeviceInjectedEvent(providerId, deviceId, deviceDescription);
@@ -424,7 +424,7 @@
         } else {
             // Only forward for ConfigProvider
             // Forwarding was added as a workaround for ONOS-490
-            if (!providerId.scheme().equals("cfg")) {
+            if (!"cfg".equals(providerId.scheme())) {
                 return Collections.emptyList();
             }
             if (master == null) {
diff --git a/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java b/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java
index 95db702..33f131e 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java
@@ -338,7 +338,7 @@
         } else {
             // Only forward for ConfigProvider
             // Forwarding was added as a workaround for ONOS-490
-            if (!providerId.scheme().equals("cfg")) {
+            if (!"cfg".equals(providerId.scheme())) {
                 return null;
             }
             // FIXME Temporary hack for NPE (ONOS-1171).
@@ -632,7 +632,7 @@
         } else {
             // Only forward for ConfigProvider
             // Forwarding was added as a workaround for ONOS-490
-            if (!providerId.scheme().equals("cfg")) {
+            if (!"cfg".equals(providerId.scheme())) {
                 return Collections.emptyList();
             }
             // FIXME Temporary hack for NPE (ONOS-1171).
diff --git a/core/store/dist/src/main/java/org/onosproject/store/link/impl/ECLinkStore.java b/core/store/dist/src/main/java/org/onosproject/store/link/impl/ECLinkStore.java
index 2240eb4..d6131da 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/link/impl/ECLinkStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/link/impl/ECLinkStore.java
@@ -263,7 +263,7 @@
         } else {
             // Only forward for ConfigProvider or NullProvider
             // Forwarding was added as a workaround for ONOS-490
-            if (!providerId.scheme().equals("cfg") && !providerId.scheme().equals("null")) {
+            if (!"cfg".equals(providerId.scheme()) && !"null".equals(providerId.scheme())) {
                 return null;
             }
             // Temporary hack for NPE (ONOS-1171).
diff --git a/drivers/ciena/src/main/java/org/onosproject/drivers/ciena/CienaWaveserverDeviceDescription.java b/drivers/ciena/src/main/java/org/onosproject/drivers/ciena/CienaWaveserverDeviceDescription.java
index 7b75590..591b65e 100644
--- a/drivers/ciena/src/main/java/org/onosproject/drivers/ciena/CienaWaveserverDeviceDescription.java
+++ b/drivers/ciena/src/main/java/org/onosproject/drivers/ciena/CienaWaveserverDeviceDescription.java
@@ -124,7 +124,7 @@
                         XmlConfigParser.loadXml(controller.get(deviceId, wsportInfoRequest, XML)),
                         annotations.set(AnnotationKeys.PORT_NAME, rxName)
                                 .build()));
-            } else if (!portId.equals("5") && !portId.equals("49")) {
+            } else if (!"5".equals(portId) && !"49".equals(portId)) {
                 DefaultAnnotations.Builder annotations = DefaultAnnotations.builder()
                         .set(AnnotationKeys.PORT_NAME, name);
                 //FIXME change when all optical types have two way information methods, see jira tickets
@@ -154,13 +154,13 @@
         final String gridTypePath = "ptp-config.adv-config.wl-spacing";
         final String frequencyPath = "ptp-config.adv-config.frequency";
 
-        boolean isEnabled = config.getString(transmitterPath).equals("enabled");
+        boolean isEnabled = "enabled".equals(config.getString(transmitterPath));
         boolean isTunable = tunableType.contains(config.getString(tunablePath));
 
         //FIXME change when all optical types have two way information methods, see jira tickets
         final int speed100GbpsinMbps = 100000;
         OduSignalType oduSignalType = oduPortSpeed == speed100GbpsinMbps ? OduSignalType.ODU4 : null;
-        GridType gridType = config.getString(gridTypePath).equals("FlexGrid") ? GridType.FLEX : null;
+        GridType gridType = "FlexGrid".equals(config.getString(gridTypePath)) ? GridType.FLEX : null;
         ChannelSpacing chSpacing = gridType == GridType.FLEX ? ChannelSpacing.CHL_6P25GHZ : null;
 
         //Working in Ghz //(Nominal central frequency - 193.1)/channelSpacing = spacingMultiplier
diff --git a/drivers/cisco/src/main/java/org/onosproject/drivers/cisco/TextBlockParserCisco.java b/drivers/cisco/src/main/java/org/onosproject/drivers/cisco/TextBlockParserCisco.java
index 2f533b5..b47411b 100644
--- a/drivers/cisco/src/main/java/org/onosproject/drivers/cisco/TextBlockParserCisco.java
+++ b/drivers/cisco/src/main/java/org/onosproject/drivers/cisco/TextBlockParserCisco.java
@@ -185,8 +185,8 @@
         long portSpeed = getPortSpeed(textStr);
         DefaultAnnotations.Builder annotations = DefaultAnnotations.builder()
                 .set(AnnotationKeys.PORT_NAME, firstWord);
-        return port.equals("-1") ? null : new DefaultPortDescription(PortNumber.portNumber(port),
-                                                                isEnabled, type, portSpeed, annotations.build());
+        return "-1".equals(port) ? null : new DefaultPortDescription(PortNumber.portNumber(port),
+                                                                     isEnabled, type, portSpeed, annotations.build());
     }
 
     /**
diff --git a/drivers/fujitsu/src/main/java/org/onosproject/drivers/fujitsu/FujitsuT100DeviceDescription.java b/drivers/fujitsu/src/main/java/org/onosproject/drivers/fujitsu/FujitsuT100DeviceDescription.java
index 5fc3a65..d00fc87 100644
--- a/drivers/fujitsu/src/main/java/org/onosproject/drivers/fujitsu/FujitsuT100DeviceDescription.java
+++ b/drivers/fujitsu/src/main/java/org/onosproject/drivers/fujitsu/FujitsuT100DeviceDescription.java
@@ -112,9 +112,9 @@
         for (HierarchicalConfiguration portConfig : subtrees) {
             if (!portConfig.getString("name").contains("LCN") &&
                     !portConfig.getString("name").contains("LMP") &&
-                    portConfig.getString("type").equals("ianaift:ethernetCsmacd")) {
+                    "ianaift:ethernetCsmacd".equals(portConfig.getString("type"))) {
                 portDescriptions.add(parseT100OduPort(portConfig, counter.getAndIncrement()));
-            } else if (portConfig.getString("type").equals("ianaift:otnOtu")) {
+            } else if ("ianaift:otnOtu".equals(portConfig.getString("type"))) {
                 portDescriptions.add(parseT100OchPort(portConfig, counter.getAndIncrement()));
             }
         }
@@ -124,8 +124,8 @@
     private static PortDescription parseT100OchPort(HierarchicalConfiguration cfg, long count) {
         PortNumber portNumber = PortNumber.portNumber(count);
         HierarchicalConfiguration otuConfig = cfg.configurationAt("otu");
-        boolean enabled = otuConfig.getString("administrative-state").equals("up");
-        OduSignalType signalType = otuConfig.getString("rate").equals("OTU4") ? OduSignalType.ODU4 : null;
+        boolean enabled = "up".equals(otuConfig.getString("administrative-state"));
+        OduSignalType signalType = "OTU4".equals(otuConfig.getString("rate")) ? OduSignalType.ODU4 : null;
         //Unsure how to retreive, outside knowledge it is tunable.
         boolean isTunable = true;
         OchSignal lambda = new OchSignal(GridType.DWDM, ChannelSpacing.CHL_50GHZ, 0, 4);
@@ -138,9 +138,9 @@
     private static PortDescription parseT100OduPort(HierarchicalConfiguration cfg, long count) {
         PortNumber portNumber = PortNumber.portNumber(count);
         HierarchicalConfiguration ethernetConfig = cfg.configurationAt("ethernet");
-        boolean enabled = ethernetConfig.getString("administrative-state").equals("up");
+        boolean enabled = "up".equals(ethernetConfig.getString("administrative-state"));
         //Rate is in kbps
-        CltSignalType signalType = ethernetConfig.getString("rate").equals("100000000") ?
+        CltSignalType signalType = "100000000".equals(ethernetConfig.getString("rate")) ?
                 CltSignalType.CLT_100GBE : null;
         DefaultAnnotations annotations = DefaultAnnotations.builder().
                 set(AnnotationKeys.PORT_NAME, cfg.getString("name")).
diff --git a/drivers/juniper/src/main/java/org/onosproject/drivers/juniper/JuniperUtils.java b/drivers/juniper/src/main/java/org/onosproject/drivers/juniper/JuniperUtils.java
index d6a1918..76f5f3b 100644
--- a/drivers/juniper/src/main/java/org/onosproject/drivers/juniper/JuniperUtils.java
+++ b/drivers/juniper/src/main/java/org/onosproject/drivers/juniper/JuniperUtils.java
@@ -207,7 +207,7 @@
 
     private static DefaultPortDescription parseDefaultPort(HierarchicalConfiguration cfg) {
         PortNumber portNumber = portNumber(cfg.getString(LO_INDEX));
-        boolean enabled = cfg.getString(STATUS).equals("up");
+        boolean enabled = "up".equals(cfg.getString(STATUS));
         int speed = parseInt(cfg.getString(SPEED).replaceAll(MBPS, ""));
 
 
diff --git a/drivers/utilities/src/main/java/org/onosproject/drivers/utilities/YangXmlUtils.java b/drivers/utilities/src/main/java/org/onosproject/drivers/utilities/YangXmlUtils.java
index c1e8771..62a2c57 100644
--- a/drivers/utilities/src/main/java/org/onosproject/drivers/utilities/YangXmlUtils.java
+++ b/drivers/utilities/src/main/java/org/onosproject/drivers/utilities/YangXmlUtils.java
@@ -131,7 +131,7 @@
     private void addProperties(HierarchicalConfiguration cfg, HierarchicalConfiguration complete) {
         cfg.getKeys().forEachRemaining(key -> {
             String property = (String) cfg.getProperty(key);
-            if (!property.equals("")) {
+            if (!"".equals(property)) {
                 complete.setProperty(key, property);
             }
         });
diff --git a/drivers/utilities/src/test/java/org/onosproject/drivers/utilities/XmlConfigParserTest.java b/drivers/utilities/src/test/java/org/onosproject/drivers/utilities/XmlConfigParserTest.java
index d344a5c..044a15a 100644
--- a/drivers/utilities/src/test/java/org/onosproject/drivers/utilities/XmlConfigParserTest.java
+++ b/drivers/utilities/src/test/java/org/onosproject/drivers/utilities/XmlConfigParserTest.java
@@ -51,7 +51,7 @@
         InputStream stream = getClass().getResourceAsStream("/testConfig.xml");
         String switchId = XmlConfigParser.parseSwitchId(XmlConfigParser
                                                                 .loadXml(stream));
-        assertTrue(switchId.equals("ofc-bridge"));
+        assertTrue("ofc-bridge".equals(switchId));
     }
 
     @Test
@@ -59,7 +59,7 @@
         InputStream stream = getClass().getResourceAsStream("/testConfig.xml");
         String capableSwitchId = XmlConfigParser
                 .parseCapableSwitchId(XmlConfigParser.loadXml(stream));
-        assertTrue(capableSwitchId.equals("openvswitch"));
+        assertTrue("openvswitch".equals(capableSwitchId));
     }
 
     @Test
diff --git a/utils/misc/src/test/java/org/onlab/util/ToolsTest.java b/utils/misc/src/test/java/org/onlab/util/ToolsTest.java
index af468c8..3fec1db 100644
--- a/utils/misc/src/test/java/org/onlab/util/ToolsTest.java
+++ b/utils/misc/src/test/java/org/onlab/util/ToolsTest.java
@@ -62,7 +62,7 @@
         ThreadFactory f = Tools.groupedThreads("foo/bar-me", "foo-%d");
         Thread t = f.newThread(() -> TestTools.print("yo"));
         assertTrue("wrong pattern", t.getName().startsWith("foo-bar-me-foo-"));
-        assertTrue("wrong group", t.getThreadGroup().getName().equals("foo/bar-me"));
+        assertTrue("wrong group", "foo/bar-me".equals(t.getThreadGroup().getName()));
     }
 
     @Test
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/ApiDocResource.java b/web/api/src/main/java/org/onosproject/rest/resources/ApiDocResource.java
index 69e5aad..7c76c44 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/ApiDocResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/ApiDocResource.java
@@ -147,7 +147,7 @@
         StringBuilder sb = new StringBuilder();
         service.getDocProviders().forEach(p -> {
             sb.append("<option value=\"").append(p.key()).append("\"")
-                    .append(p.key().equals("/onos/v1") ? " selected>" : ">")
+                    .append("/onos/v1".equals(p.key()) ? " selected>" : ">")
                     .append(p.name())
                     .append("</option>");
         });
@@ -164,7 +164,7 @@
     @GET
     @Path("{resource: .*}")
     public Response getResource(@PathParam("resource") String resource) throws IOException {
-        if (resource != null && resource.equals("")) {
+        if ("".equals(resource)) {
             return getIndex();
         }
         InputStream stream = getClass().getClassLoader().getResourceAsStream(DOCS + resource);
diff --git a/web/api/src/test/java/org/onosproject/rest/resources/IntentsResourceTest.java b/web/api/src/test/java/org/onosproject/rest/resources/IntentsResourceTest.java
index 8d5c55f..ef08c9f 100644
--- a/web/api/src/test/java/org/onosproject/rest/resources/IntentsResourceTest.java
+++ b/web/api/src/test/java/org/onosproject/rest/resources/IntentsResourceTest.java
@@ -364,14 +364,14 @@
 
             // check intent type
             final String jsonType = jsonIntent.get("type").asString();
-            if (!jsonType.equals("MockIntent")) {
+            if (!"MockIntent".equals(jsonType)) {
                 reason = "type MockIntent";
                 return false;
             }
 
             // check state field
             final String jsonState = jsonIntent.get("state").asString();
-            if (!jsonState.equals("INSTALLED")) {
+            if (!"INSTALLED".equals(jsonState)) {
                 reason = "state INSTALLED";
                 return false;
             }
diff --git a/web/api/src/test/java/org/onosproject/rest/resources/NetworkConfigWebResourceTest.java b/web/api/src/test/java/org/onosproject/rest/resources/NetworkConfigWebResourceTest.java
index 21b7ca4..c14ba8c 100644
--- a/web/api/src/test/java/org/onosproject/rest/resources/NetworkConfigWebResourceTest.java
+++ b/web/api/src/test/java/org/onosproject/rest/resources/NetworkConfigWebResourceTest.java
@@ -142,9 +142,9 @@
 
         @Override
         public SubjectFactory getSubjectFactory(String subjectClassKey) {
-            if (subjectClassKey.equals("devices")) {
+            if ("devices".equals(subjectClassKey)) {
                 return mockDevicesSubjectFactory;
-            } else if (subjectClassKey.equals("links")) {
+            } else if ("links".equals(subjectClassKey)) {
                 return mockLinksSubjectFactory;
             }
             return null;
diff --git a/web/api/src/test/java/org/onosproject/rest/resources/TopologyResourceTest.java b/web/api/src/test/java/org/onosproject/rest/resources/TopologyResourceTest.java
index 7ed3519..5aafed3 100644
--- a/web/api/src/test/java/org/onosproject/rest/resources/TopologyResourceTest.java
+++ b/web/api/src/test/java/org/onosproject/rest/resources/TopologyResourceTest.java
@@ -140,12 +140,12 @@
 
         @Override
         public boolean isInfrastructure(Topology topology, ConnectPoint connectPoint) {
-            return connectPoint.elementId().toString().equals("dev2");
+            return "dev2".equals(connectPoint.elementId().toString());
         }
 
         @Override
         public boolean isBroadcastPoint(Topology topology, ConnectPoint connectPoint) {
-            return connectPoint.elementId().toString().equals("dev1");
+            return "dev1".equals(connectPoint.elementId().toString());
         }
 
     }
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java b/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java
index bd2574b..7fb5d95 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java
@@ -489,7 +489,7 @@
             .id(hostId.toString())
             .addProp(Properties.MAC, host.mac())
             .addProp(Properties.IP, host.ipAddresses(), "[\\[\\]]")
-            .addProp(Properties.VLAN, vlan.equals("-1") ? "none" : vlan)
+            .addProp(Properties.VLAN, "-1".equals(vlan) ? "none" : vlan)
             .addSeparator()
             .addProp(Properties.LATITUDE, annot.value(AnnotationKeys.LATITUDE))
             .addProp(Properties.LONGITUDE, annot.value(AnnotationKeys.LONGITUDE));
