Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Return singleton empty collection instead of null in Read service code
[controller.git]
/
opendaylight
/
protocol_plugins
/
openflow
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
protocol_plugin
/
openflow
/
internal
/
DescStatisticsConverter.java
diff --git
a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/DescStatisticsConverter.java
b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/DescStatisticsConverter.java
index e2945628868d0b4e1b6477e2f4285353f0d3f941..28c3dd6b4f7b0df028291dfa9d8d481201806086 100644
(file)
--- a/
opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/DescStatisticsConverter.java
+++ b/
opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/DescStatisticsConverter.java
@@
-28,9
+28,13
@@
public class DescStatisticsConverter {
public DescStatisticsConverter(List<OFStatistics> statsList) {
this.hwDesc = null;
public DescStatisticsConverter(List<OFStatistics> statsList) {
this.hwDesc = null;
- this.ofDesc = (statsList == null || statsList.isEmpty())?
+ this.ofDesc = (statsList == null || statsList.isEmpty())?
null : (OFDescriptionStatistics) statsList.get(0);
}
null : (OFDescriptionStatistics) statsList.get(0);
}
+ public DescStatisticsConverter(OFDescriptionStatistics desc) {
+ this.hwDesc = null;
+ this.ofDesc = desc;
+ }
public NodeDescription getHwDescription() {
if (hwDesc == null && ofDesc != null) {
public NodeDescription getHwDescription() {
if (hwDesc == null && ofDesc != null) {