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/NsDescriptorVersionComparator.java')
-rw-r--r-- | catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/NsDescriptorVersionComparator.java | 5 |
1 files changed, 1 insertions, 4 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/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; } } |