Refactor: Improve code quality and compliance with SonarQube standards 57/139257/2
authorsourabh_sourabh <sourabh.sourabh@est.tech>
Wed, 23 Oct 2024 14:12:41 +0000 (15:12 +0100)
committerSourabh Sourabh <sourabh.sourabh@est.tech>
Thu, 24 Oct 2024 10:27:41 +0000 (10:27 +0000)
commite0c537f4463b6664e108e12962e1f4b34544776c
tree30477a8d6b505ee1731d8657e8a76650ff1d285c
parentd612628bae7c468ef69dc04a1fed89d3ba4b8f34
Refactor: Improve code quality and compliance with SonarQube standards

- Consolidated multiple `if` statements to enhance readability and maintainability.
- Replaced traditional `instanceof` checks followed by casting with the new pattern matching syntax for improved type safety and clarity.
- Removed unnecessary casts and streamlined code in `addYangLeafList` and `addDataNodeFromNormalizedNode` methods.

Issue-ID: CPS-1957
Change-Id: I46696dc184b6b3c3d0fe3a6bd12267a4e0d76193
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncWatchdog.java
cps-service/src/main/java/org/onap/cps/spi/model/DataNodeBuilder.java