aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpriyank <priyank.maheshwari@est.tech>2025-01-29 09:12:40 +0000
committermpriyank <priyank.maheshwari@est.tech>2025-01-29 10:19:44 +0000
commita6a90c010bbfd80304b6d443912affa5fe850bf4 (patch)
tree5987b773b7e5ea166fbcef1d04dcff2ed1f65a23
parent03b3791be8885daa658bbe6a98380e3cf866348b (diff)
Address sonar violations related to hazelcast
- Supressing warning caused by deprecation of RestApiConfig in hazelcast 5.5 community version , which will be removed in 6.0 so created https://lf-onap.atlassian.net/browse/CPS-2599 to address the issues - Other sonar fixes Issue-ID: CPS-2594 Change-Id: I2e95cd851eae74d8bbb4535cfbaed1dc1ef89543 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/cache/HazelcastCacheConfig.java6
-rw-r--r--cps-service/src/main/java/org/onap/cps/api/model/DataNode.java4
-rw-r--r--cps-service/src/main/java/org/onap/cps/api/model/DeltaReport.java4
-rw-r--r--docs/admin-guide.rst2
4 files changed, 11 insertions, 5 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/cache/HazelcastCacheConfig.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/cache/HazelcastCacheConfig.java
index 75007e2e35..5a6e1ce269 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/cache/HazelcastCacheConfig.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/cache/HazelcastCacheConfig.java
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START========================================================
- * Copyright (C) 2023-2024 Nordix Foundation
+ * Copyright (C) 2023-2025 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -130,6 +130,10 @@ public class HazelcastCacheConfig {
}
}
+ /*Note: Need to keep this for the meantime as Hazelcast community version 5.5 has marked RestApiConfig
+ for removal in future version and we have clients relying on these endpoints.
+ https://lf-onap.atlassian.net/browse/CPS-2599 created to address the issue. */
+ @SuppressWarnings("squid:S5738")
protected void exposeClusterInformation(final Config config) {
config.getNetworkConfig().getRestApiConfig().setEnabled(true)
.enableGroups(RestEndpointGroup.HEALTH_CHECK, RestEndpointGroup.CLUSTER_READ);
diff --git a/cps-service/src/main/java/org/onap/cps/api/model/DataNode.java b/cps-service/src/main/java/org/onap/cps/api/model/DataNode.java
index be559709f8..6597aa3908 100644
--- a/cps-service/src/main/java/org/onap/cps/api/model/DataNode.java
+++ b/cps-service/src/main/java/org/onap/cps/api/model/DataNode.java
@@ -28,17 +28,17 @@ import java.util.Collections;
import java.util.Map;
import lombok.EqualsAndHashCode;
import lombok.Getter;
+import lombok.NoArgsConstructor;
import lombok.Setter;
@Setter
@Getter
@EqualsAndHashCode
+@NoArgsConstructor
public class DataNode implements Serializable {
private static final long serialVersionUID = 1482619410918597467L;
- public DataNode() {}
-
private String dataspace;
private String schemaSetName;
private String anchorName;
diff --git a/cps-service/src/main/java/org/onap/cps/api/model/DeltaReport.java b/cps-service/src/main/java/org/onap/cps/api/model/DeltaReport.java
index 77d8d771c1..761c6ad01d 100644
--- a/cps-service/src/main/java/org/onap/cps/api/model/DeltaReport.java
+++ b/cps-service/src/main/java/org/onap/cps/api/model/DeltaReport.java
@@ -24,19 +24,19 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import java.io.Serializable;
import java.util.Map;
import lombok.Getter;
+import lombok.NoArgsConstructor;
import lombok.Setter;
@Setter
@Getter
@JsonInclude(JsonInclude.Include.NON_NULL)
+@NoArgsConstructor
public class DeltaReport {
public static final String CREATE_ACTION = "create";
public static final String REMOVE_ACTION = "remove";
public static final String REPLACE_ACTION = "replace";
- public DeltaReport() {}
-
private String action;
private String xpath;
private Map<String, Serializable> sourceData;
diff --git a/docs/admin-guide.rst b/docs/admin-guide.rst
index 7e71a07e23..156a5df832 100644
--- a/docs/admin-guide.rst
+++ b/docs/admin-guide.rst
@@ -238,6 +238,8 @@ On demand heap dump and thread dump generation using the below endpoints.
Hazelcast
---------
+.. note::
+ The below endpoints will be removed from hazelcast community version in the future release.
Hazelcast cluster state and health check can be seen using the below endpoints