mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-04 19:56:49 +02:00
Fix SONAR problems
Change-Id: Id79866971b7b2c894babe45a69f22f44cf3584db
This commit is contained in:
parent
b31c4c54f9
commit
067c44bcba
@ -129,7 +129,7 @@ public interface L2TunnelHandler {
|
||||
|
||||
private final int code;
|
||||
private final String description;
|
||||
public int nextId;
|
||||
protected int nextId;
|
||||
|
||||
Result(int code, String description) {
|
||||
this.code = code;
|
||||
|
||||
@ -160,7 +160,7 @@ public class BasicServerDriver extends AbstractHandlerBehaviour {
|
||||
try {
|
||||
result = jsonNode.get(attribute).asText();
|
||||
} catch (Exception ex) {
|
||||
throw new RuntimeException(
|
||||
throw new IllegalArgumentException(
|
||||
"Failed to read JSON attribute: " + attribute
|
||||
);
|
||||
}
|
||||
|
||||
@ -305,7 +305,7 @@ public class ServerDevicesDiscovery extends BasicServerDriver
|
||||
String portTypeStr = get(nn, NIC_PARAM_PORT_TYPE);
|
||||
Port.Type portType = PORT_TYPE_MAP.get(portTypeStr);
|
||||
if (portType == null) {
|
||||
throw new RuntimeException(
|
||||
throw new IllegalArgumentException(
|
||||
portTypeStr + " is not a valid port type for NIC " + nicId
|
||||
);
|
||||
}
|
||||
@ -313,7 +313,7 @@ public class ServerDevicesDiscovery extends BasicServerDriver
|
||||
String hwAddr = get(nn, NIC_PARAM_HW_ADDR);
|
||||
JsonNode tagNode = nicObjNode.path(NIC_PARAM_RX_FILTER);
|
||||
if (tagNode == null) {
|
||||
throw new RuntimeException(
|
||||
throw new IllegalArgumentException(
|
||||
"The Rx filters of NIC " + nicId + " are not reported"
|
||||
);
|
||||
}
|
||||
@ -723,7 +723,7 @@ public class ServerDevicesDiscovery extends BasicServerDriver
|
||||
|
||||
// And verify that this is the traffic class we want to monitor
|
||||
if (!id.equals(tcId.toString())) {
|
||||
throw new RuntimeException(
|
||||
throw new IllegalStateException(
|
||||
"Failed to retrieve monitoring data for traffic class " + tcId +
|
||||
". Traffic class ID does not agree."
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user