aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorPolavarapu, Chaitanya (cp8128) <cp8128@att.com>2019-04-09 17:02:50 -0400
committerTian Lee <TianL@amdocs.com>2019-04-11 16:05:25 +0000
commit0e93cb3b54e7868cfe5b8a85902adc100391da9c (patch)
tree108793d1b7a1e196917ff268d6d056ab6ee7fdd1 /src/main/java
parente3de90587ada88dcb3cb0a87fbfe283b2ae9f08b (diff)
Updated to use dublin schema version
Using 1.0.2 schema-service version Fixed the junit test failure for default service version Issue-ID: AAI-2338 Change-Id: Ie0ddda41f6895ff0ce8e97ad065fb935462e643a Signed-off-by: Polavarapu, Chaitanya (cp8128) <cp8128@att.com>
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/onap/aai/babel/xml/generator/ModelGenerator.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/main/java/org/onap/aai/babel/xml/generator/ModelGenerator.java b/src/main/java/org/onap/aai/babel/xml/generator/ModelGenerator.java
index c5ea37a..6695241 100644
--- a/src/main/java/org/onap/aai/babel/xml/generator/ModelGenerator.java
+++ b/src/main/java/org/onap/aai/babel/xml/generator/ModelGenerator.java
@@ -45,8 +45,6 @@ public class ModelGenerator implements ArtifactGenerator {
private static final Logger logger = LogHelper.INSTANCE;
- private static final String VERSION_DELIMITER = ".";
- private static final String VERSION_DELIMITER_REGEXP = "\\" + VERSION_DELIMITER;
private static final String DEFAULT_SERVICE_VERSION = "1.0";
/**
@@ -115,12 +113,9 @@ public class ModelGenerator implements ArtifactGenerator {
}
private static String getServiceVersion(String artifactVersion) {
- logger.debug("Artifact version=" + artifactVersion );
-
- // As of 1902, AAI-16260, we no longer edit the passed in artifact/service version.
+ logger.debug("Artifact version=" + artifactVersion);
try {
- // just make sure it's an integer
- Integer.parseInt(artifactVersion.split(VERSION_DELIMITER_REGEXP)[0]);
+ return String.valueOf(Float.parseFloat(artifactVersion));
} catch (Exception e) {
logger.warn(ApplicationMsgs.DISTRIBUTION_EVENT,
"Error generating service version from artifact version: " + artifactVersion
@@ -128,8 +123,5 @@ public class ModelGenerator implements ArtifactGenerator {
+ e);
return DEFAULT_SERVICE_VERSION;
}
-
- logger.debug("Use Artifact version as the serviceVersion=" + artifactVersion );
- return artifactVersion;
}
}