summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2021-06-26 15:56:07 +0100
committerMichael Morris <michael.morris@est.tech>2021-07-23 17:06:06 +0000
commit70119040c69c5645bf8e9a59f271f1ffea0e2d26 (patch)
treed86df41f7eb82592c240cb697906466a6047256e /catalog-be/src/main/java
parentb4b33231cead2ace0dbf18d3c5df89930101dc8c (diff)
Reduce usage of outdated library JMockit (catalog-be)
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Change-Id: I9a0e4cb7a5853e7f0d9e4eb819d4e63dacadfdf2 Issue-ID: SDC-3379
Diffstat (limited to 'catalog-be/src/main/java')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/auditing/impl/AuditConsumerEventFactory.java9
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/health/HealthCheckBusinessLogic.java4
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/scheduledtasks/AsdcComponentsCleanerTask.java6
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/ComponentValidations.java2
4 files changed, 7 insertions, 14 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/auditing/impl/AuditConsumerEventFactory.java b/catalog-be/src/main/java/org/openecomp/sdc/be/auditing/impl/AuditConsumerEventFactory.java
index 9233a1a73e..35d4c4ac27 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/auditing/impl/AuditConsumerEventFactory.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/auditing/impl/AuditConsumerEventFactory.java
@@ -35,18 +35,13 @@ public class AuditConsumerEventFactory extends AuditBaseEventFactory {
this(action, commonFields, buildConsumerName(ecompUser), buildUserName(modifier));
}
- public AuditConsumerEventFactory(AuditingActionEnum action, CommonAuditData commonFields, String ecompUser, String modifier, String timestamp) {
- this(action, commonFields, ecompUser, modifier);
- this.event.setTimestamp1(timestamp);
- }
-
private AuditConsumerEventFactory(AuditingActionEnum action, CommonAuditData commonFields, String ecompUser, String modifier) {
super(action);
event = new ConsumerEvent(getAction().getName(), commonFields, ecompUser, modifier);
}
- static String buildConsumerName(ConsumerDefinition consumer) {
- StringBuilder ecompUser = new StringBuilder();
+ private static String buildConsumerName(ConsumerDefinition consumer) {
+ final var ecompUser = new StringBuilder();
if (consumer != null) {
appendIfNotEmpty(consumer.getConsumerName(), ecompUser, ",");
appendIfNotEmpty(consumer.getConsumerSalt(), ecompUser, ",");
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/health/HealthCheckBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/health/HealthCheckBusinessLogic.java
index 3372d551ca..22013c1c04 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/health/HealthCheckBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/health/HealthCheckBusinessLogic.java
@@ -35,7 +35,6 @@ import static org.openecomp.sdc.common.impl.ExternalConfiguration.getAppVersion;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.annotations.VisibleForTesting;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -382,8 +381,7 @@ public class HealthCheckBusinessLogic {
}
}
- @VisibleForTesting
- String buildOnBoardingHealthCheckUrl() {
+ private String buildOnBoardingHealthCheckUrl() {
Configuration.OnboardingConfig onboardingConfig = ConfigurationManager.getConfigurationManager().getConfiguration().getOnboarding();
if (onboardingConfig != null) {
return String.format(hcUrl, onboardingConfig.getProtocol(), onboardingConfig.getHost(), onboardingConfig.getPort(),
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/scheduledtasks/AsdcComponentsCleanerTask.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/scheduledtasks/AsdcComponentsCleanerTask.java
index 64874a9fa8..a0511f4dc0 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/scheduledtasks/AsdcComponentsCleanerTask.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/scheduledtasks/AsdcComponentsCleanerTask.java
@@ -66,9 +66,9 @@ public class AsdcComponentsCleanerTask extends AbstractScheduleTaskRunner implem
}
for (String component : components) {
NodeTypeEnum typeEnum = NodeTypeEnum.getByNameIgnoreCase(component);
- if (typeEnum != null) {
- componentsToClean.add(typeEnum);
- }
+ if (typeEnum != null) {
+ componentsToClean.add(typeEnum);
+ }
}
long intervalInMinutes = cleanComponentsConfiguration.getCleanIntervalInMinutes();
if (intervalInMinutes < 1) {
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/ComponentValidations.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/ComponentValidations.java
index 10bb1d0ea6..ea5185396d 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/ComponentValidations.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/ComponentValidations.java
@@ -62,7 +62,7 @@ public class ComponentValidations {
.filter(instancesIds -> instancesIds.contains(instanceId)).isPresent();
}
- public static String getNormalizedName(ToscaDataDefinition toscaDataDefinition) {
+ private static String getNormalizedName(ToscaDataDefinition toscaDataDefinition) {
String name = (String) toscaDataDefinition.getToscaPresentationValue(JsonPresentationFields.NAME);
return org.openecomp.sdc.common.util.ValidationUtils.normalizeComponentInstanceName(name);
}