Suspicious reference comparison - Questionable use of reference equality rather than calling equals
Change-Id: I69cd764cbeb6009b68101241ff27a7ed1219c604
diff --git a/providers/pcep/cli/src/main/java/org/onosproject/pcep/cli/PcepSessionCommand.java b/providers/pcep/cli/src/main/java/org/onosproject/pcep/cli/PcepSessionCommand.java
index f7407ec..0eb6ed7 100644
--- a/providers/pcep/cli/src/main/java/org/onosproject/pcep/cli/PcepSessionCommand.java
+++ b/providers/pcep/cli/src/main/java/org/onosproject/pcep/cli/PcepSessionCommand.java
@@ -190,7 +190,7 @@
sessionEstablishmentFailureMap = pcepErrorDetail.sessionEstablishmentFailure();
Set<Integer> sessionFailureKeySet = sessionEstablishmentFailureMap.keySet();
for (Integer sessionFailureKey : sessionFailureKeySet) {
- if (sessionFailureKey == pcepErrorValue) {
+ if (sessionFailureKey.equals(pcepErrorValue)) {
System.out.print(sessionEstablishmentFailureMap.get(sessionFailureKey));
}
}
@@ -200,7 +200,7 @@
unknownObjectMap = pcepErrorDetail.unknownObject();
Set<Integer> unknownObjectKeySet = unknownObjectMap.keySet();
for (Integer unknownObjectKey : unknownObjectKeySet) {
- if (unknownObjectKey == pcepErrorValue) {
+ if (unknownObjectKey.equals(pcepErrorValue)) {
System.out.print(unknownObjectMap.get(unknownObjectKey));
}
}
@@ -208,7 +208,7 @@
notSupportedObjectMap = pcepErrorDetail.notSupportedObject();
Set<Integer> notSupportedObjectKeySet = notSupportedObjectMap.keySet();
for (Integer notSupportedObjectKey : notSupportedObjectKeySet) {
- if (notSupportedObjectKey == pcepErrorValue) {
+ if (notSupportedObjectKey.equals(pcepErrorValue)) {
System.out.print(notSupportedObjectMap.get(notSupportedObjectKey));
}
}
@@ -216,7 +216,7 @@
policyViolationMap = pcepErrorDetail.policyViolation();
Set<Integer> policyViolationKeySet = policyViolationMap.keySet();
for (Integer policyViolationKey : policyViolationKeySet) {
- if (policyViolationKey == pcepErrorValue) {
+ if (policyViolationKey.equals(pcepErrorValue)) {
System.out.print(policyViolationMap.get(policyViolationKey));
}
}
@@ -224,7 +224,7 @@
mandatoryObjectMissingMap = pcepErrorDetail.mandatoryObjectMissing();
Set<Integer> mandatoryObjectMissingKeySet = mandatoryObjectMissingMap.keySet();
for (Integer mandatoryObjectMissingKey : mandatoryObjectMissingKeySet) {
- if (mandatoryObjectMissingKey == pcepErrorValue) {
+ if (mandatoryObjectMissingKey.equals(pcepErrorValue)) {
System.out.print(mandatoryObjectMissingMap.get(mandatoryObjectMissingKey));
}
}
@@ -238,7 +238,7 @@
receptionOfInvalidObjectMap = pcepErrorDetail.receptionOfInvalidObject();
Set<Integer> receptionOfInvalidObjectKeySet = receptionOfInvalidObjectMap.keySet();
for (Integer receptionOfInvalidObjectKey : receptionOfInvalidObjectKeySet) {
- if (receptionOfInvalidObjectKey == pcepErrorValue) {
+ if (receptionOfInvalidObjectKey.equals(pcepErrorValue)) {
System.out.print(receptionOfInvalidObjectMap.get(receptionOfInvalidObjectKey));
}
}
@@ -246,7 +246,7 @@
invalidOperationMap = pcepErrorDetail.invalidOperation();
Set<Integer> invalidOperationKeySet = invalidOperationMap.keySet();
for (Integer invalidOperationKey : invalidOperationKeySet) {
- if (invalidOperationKey == pcepErrorValue) {
+ if (invalidOperationKey.equals(pcepErrorValue)) {
System.out.print(invalidOperationMap.get(invalidOperationKey));
}
}