commit | 55e281faef4a40e6f38de8d2b336b0d73c9961fb | [log] [tgz] |
---|---|---|
author | Pavlin Radoslavov <pavlin@onlab.us> | Thu Apr 10 10:38:04 2014 -0700 |
committer | Pavlin Radoslavov <pavlin@onlab.us> | Thu Apr 10 10:38:04 2014 -0700 |
tree | fa7b4fcd9917d3886b56910dbcc595c55e233829 | |
parent | 7d21c0a0436a6c18d350d1b09088ea87aaa95f4f [diff] |
Fix issues found by FindBugs: NP_TOSTRING_COULD_RETURN_NULL http://findbugs.sourceforge.net/bugDescriptions.html#NP_TOSTRING_COULD_RETURN_NULL If the DHCP Packet Type is not known / unrecognized, then return a string like "DHCP_UnknownType(56)" Change-Id: I8b97f890a882182cc6e2ab20d24a231b8558e509
diff --git a/src/main/java/net/onrc/onos/core/packet/DHCPPacketType.java b/src/main/java/net/onrc/onos/core/packet/DHCPPacketType.java index 9d83c15..7c4cdb8 100644 --- a/src/main/java/net/onrc/onos/core/packet/DHCPPacketType.java +++ b/src/main/java/net/onrc/onos/core/packet/DHCPPacketType.java
@@ -79,7 +79,7 @@ return "DHCPLEASEACTIVE"; } - return null; + return "DHCP_UnknownType(" + value + ")"; } public static DHCPPacketType getType(int value) {