summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-versioning-lib
diff options
context:
space:
mode:
authorDivesh Mirchandani <Divesh.Mirchandani@amdocs.com>2017-09-14 19:14:21 +0530
committerDivesh Mirchandani <Divesh.Mirchandani@amdocs.com>2017-09-18 17:26:38 +0530
commit396cb378ab8940b1adb8ba1adc656d0b4ad66f99 (patch)
treeb4f6ddc8e7cdfe39bfcbdc75cff7e85c284c5b65 /openecomp-be/lib/openecomp-sdc-versioning-lib
parent27f5c2b105676eebb477714fd7323467151965d2 (diff)
Fixed SONAR issues
Fixed blocker, critical, major & minor SONAR issues. Issue-ID: SDC-343 Change-Id: I72e5a3a7fa7d7407a92f98f77e4334827f70f926 Signed-off-by: dd4616 <Divesh.Mirchandani@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-versioning-lib')
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/Version.java4
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/impl/VersioningManagerImplTest.java10
2 files changed, 8 insertions, 6 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/Version.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/Version.java
index f0f67cf064..62d7c81cae 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/Version.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/Version.java
@@ -22,9 +22,12 @@ package org.openecomp.sdc.versioning.dao.types;
import com.datastax.driver.mapping.annotations.Transient;
import com.datastax.driver.mapping.annotations.UDT;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
@UDT(name = "version", keyspace = "dox")
public class Version {
+ private static final Logger logger = LoggerFactory.getLogger(Version.class);
public static final String VERSION_STRING_VIOLATION_MSG =
"Version string must be in the format of: {integer}.{integer}";
@@ -59,6 +62,7 @@ public class Version {
try {
version = new Version(Integer.parseInt(versionLevels[0]), Integer.parseInt(versionLevels[1]));
} catch (Exception ex) {
+ logger.debug(ex.getMessage(), ex);
throw new IllegalArgumentException(VERSION_STRING_VIOLATION_MSG);
}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/impl/VersioningManagerImplTest.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/impl/VersioningManagerImplTest.java
index d4bccc677b..d35de4f3d1 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/impl/VersioningManagerImplTest.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/impl/VersioningManagerImplTest.java
@@ -21,6 +21,10 @@
package org.openecomp.sdc.versioning.impl;
+import static org.mockito.Matchers.anyObject;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.verify;
+
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.InjectMocks;
@@ -29,7 +33,6 @@ import org.mockito.MockitoAnnotations;
import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.versioning.dao.VersionInfoDao;
import org.openecomp.sdc.versioning.dao.VersionInfoDeletedDao;
-import org.openecomp.sdc.versioning.dao.VersionableEntityDao;
import org.openecomp.sdc.versioning.dao.types.UserCandidateVersion;
import org.openecomp.sdc.versioning.dao.types.Version;
import org.openecomp.sdc.versioning.dao.types.VersionInfoDeletedEntity;
@@ -43,13 +46,8 @@ import org.testng.annotations.Test;
import java.util.Collections;
import java.util.HashSet;
-import java.util.Map;
import java.util.Set;
-import static org.mockito.Matchers.anyObject;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.verify;
-
public class VersioningManagerImplTest {
private static final String USR1 = "usr1";
private static final String USR2 = "usr2";