various bug fixes
Change-Id: Id77096bd4ee2160428619b475840b36fdb5f156c
diff --git a/utils/misc/src/main/java/org/onlab/packet/dhcp/Dhcp6IaPrefixOption.java b/utils/misc/src/main/java/org/onlab/packet/dhcp/Dhcp6IaPrefixOption.java
index 997455d..aec7b3a 100644
--- a/utils/misc/src/main/java/org/onlab/packet/dhcp/Dhcp6IaPrefixOption.java
+++ b/utils/misc/src/main/java/org/onlab/packet/dhcp/Dhcp6IaPrefixOption.java
@@ -199,7 +199,7 @@
if (obj == null) {
return false;
}
- if (!(obj instanceof Dhcp6IaAddressOption)) {
+ if (!(obj instanceof Dhcp6IaPrefixOption)) {
return false;
}
final Dhcp6IaPrefixOption other = (Dhcp6IaPrefixOption) obj;
diff --git a/utils/misc/src/test/java/org/onlab/util/ImmutableByteSequenceTest.java b/utils/misc/src/test/java/org/onlab/util/ImmutableByteSequenceTest.java
index e15065e..76981e8 100644
--- a/utils/misc/src/test/java/org/onlab/util/ImmutableByteSequenceTest.java
+++ b/utils/misc/src/test/java/org/onlab/util/ImmutableByteSequenceTest.java
@@ -17,6 +17,8 @@
package org.onlab.util;
import com.google.common.testing.EqualsTester;
+
+import org.apache.commons.lang3.RandomUtils;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
@@ -42,9 +44,9 @@
public void testCopy() throws Exception {
byte byteValue = (byte) 1;
- short shortValue = (short) byteValue;
- int intValue = (int) byteValue;
- long longValue = (long) byteValue;
+ short shortValue = byteValue;
+ int intValue = byteValue;
+ long longValue = byteValue;
byte[] arrayValue = new byte[64];
arrayValue[63] = byteValue;
ByteBuffer bufferValue = ByteBuffer.allocate(64).put(arrayValue);
@@ -82,7 +84,7 @@
@Test
public void testEndianness() throws Exception {
- long longValue = new Random().nextLong();
+ long longValue = RandomUtils.nextLong();
// creates a new sequence from a big-endian buffer
ByteBuffer bbBigEndian = ByteBuffer