diff options
author | vasraz <vasyl.razinkov@est.tech> | 2021-06-26 15:56:07 +0100 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2021-07-23 17:06:06 +0000 |
commit | 70119040c69c5645bf8e9a59f271f1ffea0e2d26 (patch) | |
tree | d86df41f7eb82592c240cb697906466a6047256e /catalog-be/src/main/java/org | |
parent | b4b33231cead2ace0dbf18d3c5df89930101dc8c (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/org')
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); } |