Removed lower priority warnings reported by FindBugs.
diff --git a/src/main/java/net/onrc/onos/ofcontroller/bgproute/PatriciaTrie.java b/src/main/java/net/onrc/onos/ofcontroller/bgproute/PatriciaTrie.java
index 89dfb30..67458e3 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/bgproute/PatriciaTrie.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/bgproute/PatriciaTrie.java
@@ -17,16 +17,16 @@
@Override
public synchronized V put(Prefix prefix, V value) {
+ if (prefix == null || value == null) {
+ throw new NullPointerException();
+ }
+
if (prefix.getPrefixLength() > maxPrefixLength) {
throw new IllegalArgumentException(String.format(
"Prefix length %d is greater than max prefix length %d",
prefix.getPrefixLength(), maxPrefixLength));
}
- if (prefix == null || value == null) {
- throw new NullPointerException();
- }
-
Node node = top;
Node match = null;
diff --git a/src/main/java/net/onrc/onos/ofcontroller/util/FlowEntryId.java b/src/main/java/net/onrc/onos/ofcontroller/util/FlowEntryId.java
index f5728b0..0ecaebe 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/util/FlowEntryId.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/util/FlowEntryId.java
@@ -86,7 +86,7 @@
*/
@Override
public boolean equals(Object obj){
- if(obj.getClass() == this.getClass()) {
+ if(obj != null && obj.getClass() == this.getClass()) {
FlowEntryId entry = (FlowEntryId) obj;
return this.value() == entry.value();
}