Various small fixes
Change-Id: I83802169d0d968f7b88d4be2cedba74b15fdd7da
diff --git a/core/api/src/main/java/org/onosproject/net/flow/criteria/UnresolvedExtensionSelector.java b/core/api/src/main/java/org/onosproject/net/flow/criteria/UnresolvedExtensionSelector.java
index 17f527b..22bf95c 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/criteria/UnresolvedExtensionSelector.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/criteria/UnresolvedExtensionSelector.java
@@ -17,7 +17,6 @@
import org.onosproject.net.flow.AbstractExtension;
import java.util.Arrays;
-import java.util.Objects;
import static com.google.common.base.MoreObjects.toStringHelper;
@@ -57,7 +56,7 @@
@Override
public int hashCode() {
- return Objects.hash(bytes);
+ return Arrays.hashCode(bytes);
}
@Override
diff --git a/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java b/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java
index 9bd7df5..33b7482 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java
@@ -101,7 +101,6 @@
* @return set-queue instruction
*/
public static SetQueueInstruction setQueue(final long queueId, final PortNumber port) {
- checkNotNull(queueId, "queue ID cannot be null");
return new SetQueueInstruction(queueId, port);
}
@@ -328,7 +327,6 @@
* @return a l3 modification
*/
public static L3ModificationInstruction modL3ArpOp(short op) {
- checkNotNull(op, "Arp operation cannot be null");
return new ModArpOpInstruction(L3SubType.ARP_OP, op);
}
@@ -428,7 +426,6 @@
* @return a L2 modification
*/
public static L2ModificationInstruction modTunnelId(long tunnelId) {
- checkNotNull(tunnelId, "Tunnel id cannot be null");
return new L2ModificationInstruction.ModTunnelIdInstruction(tunnelId);
}
diff --git a/core/api/src/main/java/org/onosproject/net/flow/instructions/UnresolvedExtensionTreatment.java b/core/api/src/main/java/org/onosproject/net/flow/instructions/UnresolvedExtensionTreatment.java
index bbe1d33..6c4a8c2 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/instructions/UnresolvedExtensionTreatment.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/instructions/UnresolvedExtensionTreatment.java
@@ -19,7 +19,6 @@
import com.google.common.base.MoreObjects;
import org.onosproject.net.flow.AbstractExtension;
import java.util.Arrays;
-import java.util.Objects;
/**
* Unresolved extension treatment.
@@ -57,7 +56,7 @@
@Override
public int hashCode() {
- return Objects.hash(bytes);
+ return Arrays.hashCode(bytes);
}
@Override