Remove unnecessary boxing
Change-Id: I78bfbcaf061348172b53bc2ce5c27ff19c1202d2
diff --git a/core/net/src/main/java/org/onosproject/net/device/impl/OpticalPortOperator.java b/core/net/src/main/java/org/onosproject/net/device/impl/OpticalPortOperator.java
index ca43f95..af0092d 100644
--- a/core/net/src/main/java/org/onosproject/net/device/impl/OpticalPortOperator.java
+++ b/core/net/src/main/java/org/onosproject/net/device/impl/OpticalPortOperator.java
@@ -64,14 +64,14 @@
if (port == null) {
// try to get the portNumber from the numName.
if (!numName.isEmpty()) {
- final long pn = Long.valueOf(numName);
+ final long pn = Long.parseLong(numName);
newPort = (!name.isEmpty()) ? PortNumber.portNumber(pn, name) : PortNumber.portNumber(pn);
} else {
// we don't have defining info (a port number value)
throw new RuntimeException("Possible misconfig, bailing on handling for: \n\t" + descr);
}
} else if ((!name.isEmpty()) && !name.equals(port.name())) {
- final long pn = (numName.isEmpty()) ? port.toLong() : Long.valueOf(numName);
+ final long pn = (numName.isEmpty()) ? port.toLong() : Long.parseLong(numName);
newPort = PortNumber.portNumber(pn, name);
}
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalConnectivityIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalConnectivityIntentCompiler.java
index 70a0957..02bc82c 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalConnectivityIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalConnectivityIntentCompiler.java
@@ -127,7 +127,7 @@
// FIXME: need to actually reserve the lambda for static lambda's
if (staticLambda != null) {
- ochSignal = new OchSignal(Frequency.ofHz(Long.valueOf(staticLambda)),
+ ochSignal = new OchSignal(Frequency.ofHz(Long.parseLong(staticLambda)),
srcOchPort.lambda().channelSpacing(),
srcOchPort.lambda().slotGranularity());
} else if (!srcOchPort.isTunable() || !dstOchPort.isTunable()) {