summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager-onap/onf14/provider/src/main
diff options
context:
space:
mode:
authorRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2021-08-31 11:45:05 +0530
committerRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2021-08-31 11:45:19 +0530
commitd2ef8edac288371db8bf049a7a82b3e084862743 (patch)
treeb4f5ef4f6cf91aae05656e9766c3ef88e9075c0a /sdnr/wt/devicemanager-onap/onf14/provider/src/main
parent8e683ffdb67a8c9e254c7f6dafa857b903d7dffb (diff)
Fix Sonar reported bugs
Improve code coverage Issue-ID: SDNC-1603 Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> Change-Id: Icb38a02ce62f327c114054c2a1db40d4cb242b6c Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/devicemanager-onap/onf14/provider/src/main')
-rw-r--r--sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14NetworkElement.java8
-rw-r--r--sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14DomInterfacePacManager.java8
-rw-r--r--sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterfaceNotificationListener.java2
3 files changed, 9 insertions, 9 deletions
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14NetworkElement.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14NetworkElement.java
index 0a98a0736..4a23b6b3c 100644
--- a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14NetworkElement.java
+++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14NetworkElement.java
@@ -351,7 +351,7 @@ public class Onf14NetworkElement implements NetworkElement {
Class<? extends LAYERPROTOCOLNAMETYPE> layerProtocolName = lp.getLayerProtocolName();
if (layerProtocolName != null) {
// if the LTP has an airInterface technology extension, the layer protocol name is air-layer
- if (layerProtocolName.getTypeName() == LAYERPROTOCOLNAMETYPEAIRLAYER.class.getName()) {
+ if (layerProtocolName.getTypeName().equals(LAYERPROTOCOLNAMETYPEAIRLAYER.class.getName())) {
TechnologySpecificPacKeys airInterfaceKey =
new TechnologySpecificPacKeys(ltp.getUuid(), lp.getLocalId());
airInterfaceList.add(airInterfaceKey);
@@ -359,14 +359,14 @@ public class Onf14NetworkElement implements NetworkElement {
ltp.getUuid().getValue(), lp.getLocalId());
}
// if the LTP has an ethernetContainier technology extension, the layer protocol name is ethernet-container-layer
- else if (layerProtocolName.getTypeName() == LAYERPROTOCOLNAMETYPEETHERNETCONTAINERLAYER.class
- .getName()) {
+ else if (layerProtocolName.getTypeName().equals(LAYERPROTOCOLNAMETYPEETHERNETCONTAINERLAYER.class
+ .getName())) {
TechnologySpecificPacKeys ethernetContainerKey =
new TechnologySpecificPacKeys(ltp.getUuid(), lp.getLocalId());
ethernetContainerList.add(ethernetContainerKey);
log.debug("Adding Ltp with uuid {} and local-id {} to the ethernet-contatinier list",
ltp.getUuid().getValue(), lp.getLocalId());
- } else if (layerProtocolName.getTypeName() == LAYERPROTOCOLNAMETYPEWIRELAYER.class.getName()) {
+ } else if (layerProtocolName.getTypeName().equals(LAYERPROTOCOLNAMETYPEWIRELAYER.class.getName())) {
TechnologySpecificPacKeys wireInterfaceKey =
new TechnologySpecificPacKeys(ltp.getUuid(), lp.getLocalId());
wireInterfaceList.add(wireInterfaceKey);
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14DomInterfacePacManager.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14DomInterfacePacManager.java
index 7fca996e9..422f6b0fa 100644
--- a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14DomInterfacePacManager.java
+++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14DomInterfacePacManager.java
@@ -194,7 +194,7 @@ public class Onf14DomInterfacePacManager implements DOMNotificationListener {
Class<? extends LAYERPROTOCOLNAMETYPE> layerProtocolName = lp.getLayerProtocolName();
if (layerProtocolName != null) {
// if the LTP has an airInterface technology extension, the layer protocol name is air-layer
- if (layerProtocolName.getTypeName() == LAYERPROTOCOLNAMETYPEAIRLAYER.class.getName()) {
+ if (layerProtocolName.getTypeName().equals(LAYERPROTOCOLNAMETYPEAIRLAYER.class.getName())) {
TechnologySpecificPacKeys airInterfaceKey =
new TechnologySpecificPacKeys(ltp.getUuid(), lp.getLocalId());
airInterfaceList.add(airInterfaceKey);
@@ -202,14 +202,14 @@ public class Onf14DomInterfacePacManager implements DOMNotificationListener {
ltp.getUuid().getValue(), lp.getLocalId());
}
// if the LTP has an ethernetContainier technology extension, the layer protocol name is ethernet-container-layer
- else if (layerProtocolName.getTypeName() == LAYERPROTOCOLNAMETYPEETHERNETCONTAINERLAYER.class
- .getName()) {
+ else if (layerProtocolName.getTypeName().equals(LAYERPROTOCOLNAMETYPEETHERNETCONTAINERLAYER.class
+ .getName())) {
TechnologySpecificPacKeys ethernetContainerKey =
new TechnologySpecificPacKeys(ltp.getUuid(), lp.getLocalId());
ethernetContainerList.add(ethernetContainerKey);
log.debug("Adding Ltp with uuid {} and local-id {} to the ethernet-contatinier list",
ltp.getUuid().getValue(), lp.getLocalId());
- } else if (layerProtocolName.getTypeName() == LAYERPROTOCOLNAMETYPEWIRELAYER.class.getName()) {
+ } else if (layerProtocolName.getTypeName().equals(LAYERPROTOCOLNAMETYPEWIRELAYER.class.getName())) {
TechnologySpecificPacKeys wireInterfaceKey =
new TechnologySpecificPacKeys(ltp.getUuid(), lp.getLocalId());
wireInterfaceList.add(wireInterfaceKey);
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterfaceNotificationListener.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterfaceNotificationListener.java
index 840f2c328..6848e6765 100644
--- a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterfaceNotificationListener.java
+++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterfaceNotificationListener.java
@@ -95,7 +95,7 @@ public class Onf14WireInterfaceNotificationListener implements WireInterface20Li
FaultlogEntity faultAlarm = new FaultlogBuilder().setObjectId(notification.getObjectIdRef().getValue())
.setProblem(notification.getProblem()).setTimestamp(notification.getTimestamp())
.setNodeId(this.netconfAccessor.getNodeId().getValue()).setSourceType(SourceType.Netconf)
- .setSeverity(mapSeverity(notification.getSeverity())).setCounter(notification.getCounter().intValue())
+ .setSeverity(mapSeverity(notification.getSeverity())).setCounter(notification.getCounter())
.build();
serviceProvider.getFaultService().faultNotification(faultAlarm);
serviceProvider.getWebsocketService().sendNotification( notification, netconfAccessor.getNodeId(),