Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Removed getClass comparison if FlowComparator."
[controller.git]
/
opendaylight
/
md-sal
/
statistics-manager
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
md
/
statistics
/
manager
/
FlowComparator.java
diff --git
a/opendaylight/md-sal/statistics-manager/src/main/java/org/opendaylight/controller/md/statistics/manager/FlowComparator.java
b/opendaylight/md-sal/statistics-manager/src/main/java/org/opendaylight/controller/md/statistics/manager/FlowComparator.java
index b1db280c2472802aed2e97ce525422308eca3b12..2b67edfd9d318d29cbd3508c17a1e8bafd9f4a70 100644
(file)
--- a/
opendaylight/md-sal/statistics-manager/src/main/java/org/opendaylight/controller/md/statistics/manager/FlowComparator.java
+++ b/
opendaylight/md-sal/statistics-manager/src/main/java/org/opendaylight/controller/md/statistics/manager/FlowComparator.java
@@
-32,7
+32,7
@@
final class FlowComparator {
}
public static boolean flowEquals(Flow statsFlow, Flow storedFlow) {
}
public static boolean flowEquals(Flow statsFlow, Flow storedFlow) {
- if (statsFlow
.getClass() != storedFlow.getClass()
) {
+ if (statsFlow
== null || storedFlow == null
) {
return false;
}
if (statsFlow.getContainerName()== null) {
return false;
}
if (statsFlow.getContainerName()== null) {
@@
-42,19
+42,18
@@
final class FlowComparator {
} else if(!statsFlow.getContainerName().equals(storedFlow.getContainerName())) {
return false;
}
} else if(!statsFlow.getContainerName().equals(storedFlow.getContainerName())) {
return false;
}
- if (st
atsFlow.getMatch()
== null) {
- if (st
oredFlow.getMatch() != null
) {
+ if (st
oredFlow.getPriority()
== null) {
+ if (st
atsFlow.getPriority() != null && statsFlow.getPriority()!= 0x8000
) {
return false;
}
return false;
}
- } //else if(!statsFlow.getMatch().equals(storedFlow.getMatch())) {
- else if(!matchEquals(statsFlow.getMatch(), storedFlow.getMatch())) {
+ } else if(!statsFlow.getPriority().equals(storedFlow.getPriority())) {
return false;
}
return false;
}
- if (st
oredFlow.getPriority()
== null) {
- if (st
atsFlow.getPriority() != null && statsFlow.getPriority()!= 0x8000
) {
+ if (st
atsFlow.getMatch()
== null) {
+ if (st
oredFlow.getMatch() != null
) {
return false;
}
return false;
}
- } else if(!
statsFlow.getPriority().equals(storedFlow.getPriority
())) {
+ } else if(!
matchEquals(statsFlow.getMatch(), storedFlow.getMatch
())) {
return false;
}
if (statsFlow.getTableId() == null) {
return false;
}
if (statsFlow.getTableId() == null) {
@@
-97,9
+96,6
@@
final class FlowComparator {
}
if (storedFlow == null && statsFlow != null) return false;
if (statsFlow == null && storedFlow != null) return false;
}
if (storedFlow == null && statsFlow != null) return false;
if (statsFlow == null && storedFlow != null) return false;
- if (storedFlow.getClass() != statsFlow.getClass()) {
- return false;
- }
if (storedFlow.getEthernetMatch() == null) {
if (statsFlow.getEthernetMatch() != null) {
return false;
if (storedFlow.getEthernetMatch() == null) {
if (statsFlow.getEthernetMatch() != null) {
return false;