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 "bug 537 - Node Reconciliation"
[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..cd9738c894554a8e609eac1acb4b9fbd9534eac9 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,6
+32,9
@@
final class FlowComparator {
}
public static boolean flowEquals(Flow statsFlow, Flow storedFlow) {
}
public static boolean flowEquals(Flow statsFlow, Flow storedFlow) {
+ if (statsFlow == null || storedFlow == null) {
+ return false;
+ }
if (statsFlow.getClass() != storedFlow.getClass()) {
return false;
}
if (statsFlow.getClass() != storedFlow.getClass()) {
return false;
}
@@
-42,19
+45,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) {