Sonar suggestion - possible null pointer dereferences in equals() methods

Change-Id: I021c202df99098e5ecf05949954c4c9355d944db
diff --git a/src/main/java/org/onosproject/segmentrouting/pwaas/DefaultL2Tunnel.java b/src/main/java/org/onosproject/segmentrouting/pwaas/DefaultL2Tunnel.java
index bddc191..60de5c8 100644
--- a/src/main/java/org/onosproject/segmentrouting/pwaas/DefaultL2Tunnel.java
+++ b/src/main/java/org/onosproject/segmentrouting/pwaas/DefaultL2Tunnel.java
@@ -186,7 +186,7 @@
 
     @Override
     public int hashCode() {
-        return Objects.hash(this.tunnelId, this.pwLabel);
+        return Objects.hash(this.tunnelId, this.pwMode, this.sdTag, this.pwLabel, this.interCoLabel);
     }
 
     @Override
@@ -195,10 +195,6 @@
             return true;
         }
 
-        if (getClass() != o.getClass()) {
-            return false;
-        }
-
         if (o instanceof DefaultL2Tunnel) {
             DefaultL2Tunnel that = (DefaultL2Tunnel) o;
             return this.tunnelId == that.tunnelId &&
diff --git a/src/main/java/org/onosproject/segmentrouting/pwaas/DefaultL2TunnelDescription.java b/src/main/java/org/onosproject/segmentrouting/pwaas/DefaultL2TunnelDescription.java
index 8c72890..a91f5ee 100644
--- a/src/main/java/org/onosproject/segmentrouting/pwaas/DefaultL2TunnelDescription.java
+++ b/src/main/java/org/onosproject/segmentrouting/pwaas/DefaultL2TunnelDescription.java
@@ -90,10 +90,6 @@
             return true;
         }
 
-        if (getClass() != o.getClass()) {
-            return false;
-        }
-
         if (o instanceof DefaultL2TunnelDescription) {
             DefaultL2TunnelDescription that = (DefaultL2TunnelDescription) o;
             // Equality is based on tunnel id and pw label