Adding id to equality check for the bandwidth profile
Change-Id: I9e82f920116626754e61768af5e1f3d7b35fcf54
diff --git a/api/src/main/java/org/opencord/sadis/BandwidthProfileInformation.java b/api/src/main/java/org/opencord/sadis/BandwidthProfileInformation.java
index 0ad0ad4..3f71d0b 100644
--- a/api/src/main/java/org/opencord/sadis/BandwidthProfileInformation.java
+++ b/api/src/main/java/org/opencord/sadis/BandwidthProfileInformation.java
@@ -130,7 +130,8 @@
return false;
}
BandwidthProfileInformation that = (BandwidthProfileInformation) o;
- return peakInformationRate == that.peakInformationRate &&
+ return Objects.equals(id, that.id) &&
+ peakInformationRate == that.peakInformationRate &&
committedInformationRate == that.committedInformationRate &&
exceededInformationRate == that.exceededInformationRate &&
assuredInformationRate == that.assuredInformationRate &&
@@ -143,7 +144,7 @@
@Override
public int hashCode() {
- return Objects.hash(peakInformationRate, peakBurstSize, committedInformationRate, committedBurstSize,
+ return Objects.hash(id, peakInformationRate, peakBurstSize, committedInformationRate, committedBurstSize,
exceededInformationRate, exceededBurstSize, assuredInformationRate, guaranteedInformationRate);
}