Fixing equals method in UniTagInformation
Change-Id: I85c7c13cef19180e120a03941d560c815876bdfc
diff --git a/api/src/main/java/org/opencord/sadis/UniTagInformation.java b/api/src/main/java/org/opencord/sadis/UniTagInformation.java
index 05fa7ff..12bbaae 100644
--- a/api/src/main/java/org/opencord/sadis/UniTagInformation.java
+++ b/api/src/main/java/org/opencord/sadis/UniTagInformation.java
@@ -18,6 +18,8 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import org.onlab.packet.VlanId;
+import java.util.Objects;
+
/**
* Represents a unit of information about a service.
*/
@@ -188,16 +190,16 @@
UniTagInformation that = (UniTagInformation) o;
- if (uniTagMatch != that.uniTagMatch) {
+ if (!Objects.equals(uniTagMatch, that.uniTagMatch)) {
return false;
}
if (technologyProfileId != that.technologyProfileId) {
return false;
}
- if (ponCTag != that.ponCTag) {
+ if (!Objects.equals(ponCTag, that.ponCTag)) {
return false;
}
- if (ponSTag != that.ponSTag) {
+ if (!Objects.equals(ponSTag, that.ponSTag)) {
return false;
}
if (usPonCTagPriority != that.usPonCTagPriority) {
@@ -215,7 +217,7 @@
if (enableMacLearning != that.enableMacLearning) {
return false;
}
- if (configuredMacAddress != that.configuredMacAddress) {
+ if (!Objects.equals(configuredMacAddress, that.configuredMacAddress)) {
return false;
}
if (isDhcpRequired != that.isDhcpRequired) {
diff --git a/app/src/main/java/org/opencord/sadis/impl/InformationAdapter.java b/app/src/main/java/org/opencord/sadis/impl/InformationAdapter.java
index 216b5f8..f10e589 100644
--- a/app/src/main/java/org/opencord/sadis/impl/InformationAdapter.java
+++ b/app/src/main/java/org/opencord/sadis/impl/InformationAdapter.java
@@ -163,6 +163,7 @@
* org.opencord.sadis.BaseInformationService#getfromCache(java.lang.
* String)
*/
+ //TODO remove
@Override
public T getfromCache(String id) {
Cache<String, T> local;