diff options
Diffstat (limited to 'catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config')
3 files changed, 4 insertions, 11 deletions
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/EtsiVersion.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/EtsiVersion.java index d447dc428d..180337d1d5 100644 --- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/EtsiVersion.java +++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/EtsiVersion.java @@ -1,3 +1,4 @@ + /* * ============LICENSE_START======================================================= * Copyright (C) 2021 Nordix Foundation @@ -16,7 +17,6 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator.config; import lombok.AllArgsConstructor; @@ -29,10 +29,7 @@ import org.apache.commons.lang.StringUtils; @Getter @AllArgsConstructor public enum EtsiVersion { - VERSION_2_5_1("2.5.1"), - VERSION_2_7_1("2.7.1"), - VERSION_3_3_1("3.3.1"); - + VERSION_2_5_1("2.5.1"), VERSION_2_7_1("2.7.1"), VERSION_3_3_1("3.3.1"); private final String version; public static EtsiVersion convertOrNull(final String etsiVersion) { @@ -48,7 +45,6 @@ public enum EtsiVersion { if (VERSION_3_3_1.getVersion().equals(etsiVersion)) { return VERSION_3_3_1; } - return null; } diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/NsDescriptorConfig.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/NsDescriptorConfig.java index d17b48d158..d17b03f7c4 100644 --- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/NsDescriptorConfig.java +++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/NsDescriptorConfig.java @@ -1,3 +1,4 @@ + /* * ============LICENSE_START======================================================= * Copyright (C) 2021 Nordix Foundation @@ -16,7 +17,6 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator.config; import lombok.Getter; diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/NsDescriptorVersionComparator.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/NsDescriptorVersionComparator.java index 40e499c8c7..f24a0442ba 100644 --- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/NsDescriptorVersionComparator.java +++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/NsDescriptorVersionComparator.java @@ -1,3 +1,4 @@ + /* * ============LICENSE_START======================================================= * Copyright (C) 2021 Nordix Foundation @@ -16,7 +17,6 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator.config; import java.util.Comparator; @@ -32,19 +32,16 @@ public class NsDescriptorVersionComparator implements Comparator<EtsiVersion> { } else if (Integer.parseInt(v1[0]) < Integer.parseInt(v2[0])) { return -1; } - if (Integer.parseInt(v1[1]) > Integer.parseInt(v2[1])) { return 1; } else if (Integer.parseInt(v1[1]) < Integer.parseInt(v2[1])) { return -1; } - if (Integer.parseInt(v1[2]) > Integer.parseInt(v2[2])) { return 1; } else if (Integer.parseInt(v1[2]) < Integer.parseInt(v2[2])) { return -1; } - return 0; } } |