mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-15 17:31:31 +02:00
Fix some sonar suggestions
- use long arithmetic for long expressions - exit routine after determining that a pointer is null Change-Id: I755b1533773f6838e88ba94ced376f30576c275b
This commit is contained in:
parent
10f0d51401
commit
cc7a176d85
@ -469,6 +469,7 @@ public class LumentumNetconfRoadmFlowRuleProgrammable extends AbstractHandlerBeh
|
||||
|
||||
if (pair == null) {
|
||||
log.error("Lumentum RPC delete-connection, connection not found on the local cache");
|
||||
throw new IllegalStateException("Lumentum RPC delete-connection, connection not found on the local cache");
|
||||
}
|
||||
|
||||
String module = pair.getLeft().toString();
|
||||
|
@ -85,7 +85,7 @@ public class LumentumSnmpDevice {
|
||||
target.setCommunity(new OctetString("public"));
|
||||
target.setAddress(targetAddress);
|
||||
target.setRetries(3);
|
||||
target.setTimeout(1000 * 3);
|
||||
target.setTimeout(1000L * 3L);
|
||||
target.setVersion(SnmpConstants.version2c);
|
||||
target.setMaxSizeRequestPDU(MAX_SIZE_RESPONSE_PDU);
|
||||
}
|
||||
|
@ -182,14 +182,14 @@ public class LumentumWaveReadyDiscovery extends AbstractHandlerBehaviour impleme
|
||||
Arrays.stream(s.split("\"\"")).forEach(p -> {
|
||||
if (p.contains(EIGHTFIFTY)) {
|
||||
PortDescription cltPort = oduCltPortDescription(
|
||||
PortNumber.portNumber(ports.size() + 1),
|
||||
PortNumber.portNumber(ports.size() + 1L),
|
||||
true,
|
||||
CltSignalType.CLT_10GBE,
|
||||
extractAnnotations(p));
|
||||
ports.add(cltPort);
|
||||
} else {
|
||||
PortDescription netPort = ochPortDescription(
|
||||
PortNumber.portNumber(ports.size() + 1),
|
||||
PortNumber.portNumber(ports.size() + 1L),
|
||||
true,
|
||||
OduSignalType.ODU2e,
|
||||
true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user