aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/utils/VendorSoftwareProductUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/utils/VendorSoftwareProductUtils.java')
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/utils/VendorSoftwareProductUtils.java32
1 files changed, 15 insertions, 17 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/utils/VendorSoftwareProductUtils.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/utils/VendorSoftwareProductUtils.java
index 369efe38bc..d5c6ab4c64 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/utils/VendorSoftwareProductUtils.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/utils/VendorSoftwareProductUtils.java
@@ -1,21 +1,17 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2016-2017 European Support Limited
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- * ============LICENSE_END=========================================================
*/
package org.openecomp.sdc.vendorsoftwareproduct.utils;
@@ -41,14 +37,17 @@ import org.slf4j.MDC;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.HashMap;
+import java.util.EnumMap;
import java.util.List;
import java.util.Map;
public class VendorSoftwareProductUtils {
- protected static Logger logger =
- LoggerFactory.getLogger(VendorSoftwareProductUtils.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(VendorSoftwareProductUtils.class);
+
+ private VendorSoftwareProductUtils(){
+
+ }
/**
* Add file names to upload file response.
@@ -66,8 +65,6 @@ public class VendorSoftwareProductUtils {
}
uploadFileResponse.removeFileFromList(SdcCommon.MANIFEST_NAME);
}
-
-
/**
* Validate content zip data.
*
@@ -92,7 +89,8 @@ public class VendorSoftwareProductUtils {
*/
public static Map<MonitoringUploadType, String> mapArtifactsByType(
Collection<ComponentMonitoringUploadEntity> artifacts) {
- Map<MonitoringUploadType, String> artifactTypeToFilename = new HashMap<>();
+ Map<MonitoringUploadType, String> artifactTypeToFilename
+ = new EnumMap<>(MonitoringUploadType.class);
for (ComponentMonitoringUploadEntity entity : artifacts) {
artifactTypeToFilename.put(entity.getType(), entity.getArtifactName());
@@ -121,7 +119,7 @@ public class VendorSoftwareProductUtils {
for (Map.Entry<String, List<ErrorMessage>> listEntry : errors.entrySet()) {
List<ErrorMessage> errorList = listEntry.getValue();
for (ErrorMessage message : errorList) {
- logger.error(message.getMessage());
+ LOGGER.error(message.getMessage());
}
}
}
@@ -143,7 +141,7 @@ public class VendorSoftwareProductUtils {
}
for (ErrorCode error : errors) {
- logger.error(error.message());
+ LOGGER.error(error.message());
}
}
}