mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-06 04:36:17 +02:00
Sonar suggestion - don't use bit operator in a boolean expression
Change-Id: I69e254ffea0c72a040077d6e6a13c326d44c1197
This commit is contained in:
parent
faed9f3b44
commit
e559bcf45d
@ -39,7 +39,7 @@ public final class PacketUtils {
|
||||
public static void checkBufferLength(int byteLength, int offset, int length)
|
||||
throws DeserializationException {
|
||||
boolean ok = (offset >= 0 && offset < byteLength);
|
||||
ok = ok & (length >= 0 && offset + length <= byteLength);
|
||||
ok = ok && (length >= 0 && offset + length <= byteLength);
|
||||
|
||||
if (!ok) {
|
||||
throw new DeserializationException("Unable to read " + length + " bytes from a "
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user