commit | 14a6c506e4c6356228bd3c801fc38dc2e26e261d | [log] [tgz] |
---|---|---|
author | Ray Milkey <ray@opennetworking.org> | Wed Oct 03 10:24:51 2018 -0700 |
committer | Ray Milkey <ray@opennetworking.org> | Tue Oct 09 16:44:53 2018 +0000 |
tree | 7a32bf280888044ae837fc56f4cb3d8b9f0f3539 | |
parent | d15c5f63f779ce070e0c4e25020059aef7ff18fe [diff] |
Fix NPE when trying to reference delta port statistics via REST API Change-Id: Ic195d06e55bd4d8379ac28938e93105d6d181bf6
diff --git a/core/api/src/main/java/org/onosproject/net/AbstractAnnotated.java b/core/api/src/main/java/org/onosproject/net/AbstractAnnotated.java index 9e71fbd..07bc6a7 100644 --- a/core/api/src/main/java/org/onosproject/net/AbstractAnnotated.java +++ b/core/api/src/main/java/org/onosproject/net/AbstractAnnotated.java
@@ -37,7 +37,7 @@ */ protected AbstractAnnotated(Annotations... annotations) { checkArgument(annotations.length <= 1, "Only one set of annotations is expected"); - this.annotations = annotations.length == 1 ? annotations[0] : EMPTY; + this.annotations = annotations.length == 0 || annotations[0] == null ? EMPTY : annotations[0]; } @Override