summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-core-lib
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-core-lib')
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/test/java/org/openecomp/sdc/applicationconfig/dao/ApplicationConfigImplDaoTest.java9
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/FactoryConfig.java1
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraNoSqlDbImpl.java5
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraSessionFactory.java12
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/util/ConfigurationManager.java6
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/org/openecomp/core/nosqldb/NoSqlDbTest.java2
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/file/FileUtils.java4
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/json/JsonUtil.java2
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-api/src/main/java/org/openecomp/core/zusammen/api/ZusammenAdaptor.java1
9 files changed, 34 insertions, 8 deletions
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/test/java/org/openecomp/sdc/applicationconfig/dao/ApplicationConfigImplDaoTest.java b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/test/java/org/openecomp/sdc/applicationconfig/dao/ApplicationConfigImplDaoTest.java
index 6d92330493..6b5c5f94c4 100644
--- a/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/test/java/org/openecomp/sdc/applicationconfig/dao/ApplicationConfigImplDaoTest.java
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/test/java/org/openecomp/sdc/applicationconfig/dao/ApplicationConfigImplDaoTest.java
@@ -30,6 +30,8 @@ import org.openecomp.core.utilities.file.FileUtils;
import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.common.errors.ErrorCategory;
import org.openecomp.sdc.common.errors.ErrorCode;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@@ -48,6 +50,11 @@ public class ApplicationConfigImplDaoTest {
private static ApplicationConfig applicationConfig =
ApplicationConfigFactory.getInstance().createInterface();
+ private final static Logger log = (Logger) LoggerFactory.getLogger
+ (ApplicationConfigImplDaoTest.class.getName());
+
+ private final Logger logger = (Logger) LoggerFactory.getLogger(this.getClass().getName());
+
@BeforeClass
public static void init() {
try {
@@ -64,6 +71,7 @@ public class ApplicationConfigImplDaoTest {
applicationConfigDao.create(applicationConfigEntity3);
} catch (Exception e) {
+ log.debug("",e);
throw new CoreException(new ErrorCode.ErrorCodeBuilder().
withCategory(ErrorCategory.APPLICATION).
withId(SCHEMA_GENERATOR_INITIALIZATION_ERROR).
@@ -91,6 +99,7 @@ public class ApplicationConfigImplDaoTest {
try {
applicationConfig.getConfigurationData("test - namespace", "aaa");
} catch (CoreException ce) {
+ logger.debug("", ce);
Assert.assertEquals(ce.getMessage(),
"Configuration for namespace test - namespace and key aaa was not found");
}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/FactoryConfig.java b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/FactoryConfig.java
index d664cbee38..31822b6bdc 100644
--- a/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/FactoryConfig.java
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/FactoryConfig.java
@@ -35,7 +35,6 @@ public final class FactoryConfig {
INSTANCE = CommonMethods.newInstance(
"org.openecomp.core.factory.FactoriesConfigImpl", FactoriesConfiguration.class);
} catch (Exception exception) {
- exception.printStackTrace();
throw exception;
}
}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraNoSqlDbImpl.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraNoSqlDbImpl.java
index 4ecc26879a..93410bc581 100644
--- a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraNoSqlDbImpl.java
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraNoSqlDbImpl.java
@@ -28,6 +28,8 @@ import org.openecomp.core.utilities.CommonMethods;
import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.common.errors.ErrorCategory;
import org.openecomp.sdc.common.errors.ErrorCode;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
import java.util.Set;
import java.util.stream.Collectors;
@@ -38,6 +40,8 @@ class CassandraNoSqlDbImpl implements NoSqlDb {
private final String keySpace;
private final MappingManager mappingManager;
+ private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName());
+
public CassandraNoSqlDbImpl(Session session) {
this.session = session;
@@ -109,6 +113,7 @@ class CassandraNoSqlDbImpl implements NoSqlDb {
.collect(Collectors.toSet());
return versions.stream().collect(Collectors.joining(","));
} catch (Exception e){
+ log.debug("",e);
return "Failed to retrieve version";
}
}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraSessionFactory.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraSessionFactory.java
index 7b9b2ca84f..4bc8262439 100644
--- a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraSessionFactory.java
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraSessionFactory.java
@@ -20,12 +20,13 @@
package org.openecomp.core.nosqldb.impl.cassandra;
-import com.google.common.base.Optional;
-
import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.SSLOptions;
import com.datastax.driver.core.Session;
+import com.google.common.base.Optional;
import org.openecomp.core.nosqldb.util.CassandraUtils;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
import java.io.FileInputStream;
import java.io.IOException;
@@ -36,11 +37,14 @@ import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.UnrecoverableKeyException;
import java.security.cert.CertificateException;
-import java.util.Objects;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManagerFactory;
public class CassandraSessionFactory {
+
+ private static final Logger log = (Logger) LoggerFactory.getLogger
+ (CassandraSessionFactory.class.getName());
+
public static Session getSession() {
return ReferenceHolder.CASSANDRA;
}
@@ -112,7 +116,7 @@ public class CassandraSessionFactory {
ctx.init(null, tmf.getTrustManagers(), new SecureRandom());
} catch (Exception exception) {
- exception.printStackTrace();
+ log.debug("",exception);
} finally {
if (tsf != null) {
tsf.close();
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/util/ConfigurationManager.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/util/ConfigurationManager.java
index c00db41ed9..1f5e20fd0b 100644
--- a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/util/ConfigurationManager.java
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/util/ConfigurationManager.java
@@ -20,6 +20,8 @@
package org.openecomp.core.nosqldb.util;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.services.YamlUtil;
import java.io.FileInputStream;
@@ -58,6 +60,8 @@ public class ConfigurationManager {
private static ConfigurationManager instance = null;
private final LinkedHashMap<String, Object> cassandraConfiguration;
+ private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName());
+
private ConfigurationManager() {
YamlUtil yamlUtil = new YamlUtil();
@@ -227,7 +231,7 @@ public class ConfigurationManager {
try {
is = new FileInputStream(file);
} catch (FileNotFoundException exception) {
- exception.printStackTrace();
+ log.debug("",exception);
}
return is;
}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/org/openecomp/core/nosqldb/NoSqlDbTest.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/org/openecomp/core/nosqldb/NoSqlDbTest.java
index fc96335daf..5c4f951a7b 100644
--- a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/org/openecomp/core/nosqldb/NoSqlDbTest.java
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/org/openecomp/core/nosqldb/NoSqlDbTest.java
@@ -32,7 +32,7 @@ import java.util.List;
public class NoSqlDbTest {
- private static NoSqlDb noSqlDb;
+ private NoSqlDb noSqlDb;
/*
@Test
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/file/FileUtils.java b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/file/FileUtils.java
index 0fb587cc68..6ff213c34c 100644
--- a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/file/FileUtils.java
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/file/FileUtils.java
@@ -23,6 +23,8 @@ package org.openecomp.core.utilities.file;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.IOUtils;
import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.services.YamlUtil;
import java.io.ByteArrayInputStream;
@@ -43,6 +45,8 @@ import java.util.zip.ZipInputStream;
*/
public class FileUtils {
+ //private final static Logger log = (Logger) LoggerFactory.getLogger(FileUtils.class.getName());
+
/**
* Allows to consume an input stream open against a resource with a given file name.
*
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/json/JsonUtil.java b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/json/JsonUtil.java
index 5f0bc90845..8454bc61a8 100644
--- a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/json/JsonUtil.java
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/json/JsonUtil.java
@@ -117,6 +117,7 @@ public class JsonUtil {
try {
is.close();
} catch (IOException ignore) {
+ logger.debug("",ignore);
//do nothing
}
}
@@ -136,6 +137,7 @@ public class JsonUtil {
try {
return new JsonParser().parse(json).isJsonObject();
} catch (JsonSyntaxException jse) {
+ logger.debug("",jse);
return false;
}
}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-api/src/main/java/org/openecomp/core/zusammen/api/ZusammenAdaptor.java b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-api/src/main/java/org/openecomp/core/zusammen/api/ZusammenAdaptor.java
index f4e8688d63..2ba447fd6a 100644
--- a/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-api/src/main/java/org/openecomp/core/zusammen/api/ZusammenAdaptor.java
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-api/src/main/java/org/openecomp/core/zusammen/api/ZusammenAdaptor.java
@@ -12,7 +12,6 @@ import com.amdocs.zusammen.datatypes.item.Item;
import com.amdocs.zusammen.datatypes.item.ItemVersion;
import com.amdocs.zusammen.datatypes.item.ItemVersionData;
import com.amdocs.zusammen.datatypes.itemversion.Tag;
-import org.apache.commons.lang3.tuple.ImmutablePair;
import java.util.Collection;
import java.util.Optional;