aboutsummaryrefslogtreecommitdiffstats
path: root/aai-traversal
diff options
context:
space:
mode:
authorShubhada Ramkrishna Vaze <SV00449682@TechMahindra.com>2019-01-09 12:12:53 +0530
committerShubhada Vaze <SV00449682@techmahindra.com>2019-01-11 06:29:03 +0000
commit0d5e5b2130b0b3e0d3b4b882acf8d141e7dc215d (patch)
treef5e301f80299cdbb687f13e40f61700c1d950b76 /aai-traversal
parentc0365f15a25aed95f7e812dc1d7e7ac588ebbed5 (diff)
Sonar Critical: Use Logger and log the exception
Fix exception logging issues at multiple locations in same file. Change-Id: I6c18b4a4508d3e6af677ff2f70d668d970c3910f Issue-ID: AAI-2061 Signed-off-by: Shubhada Ramkrishna Vaze <SV00449682@TechMahindra.com> Sonar Critical: Use Logger and log the exception Suggested changes are made Change-Id: I0287b409a265ebf8ee3916266b96c396e44df5da Issue-ID: AAI-2061 Signed-off-by: Shubhada Ramkrishna Vaze <SV00449682@TechMahindra.com>
Diffstat (limited to 'aai-traversal')
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/util/MakeNamedQuery.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/aai-traversal/src/main/java/org/onap/aai/util/MakeNamedQuery.java b/aai-traversal/src/main/java/org/onap/aai/util/MakeNamedQuery.java
index a805e19..503cf6c 100644
--- a/aai-traversal/src/main/java/org/onap/aai/util/MakeNamedQuery.java
+++ b/aai-traversal/src/main/java/org/onap/aai/util/MakeNamedQuery.java
@@ -26,6 +26,8 @@ import java.util.List;
import java.util.Map.Entry;
import java.util.UUID;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
import org.apache.commons.io.FileUtils;
import org.onap.aai.config.SpringContextAware;
import org.onap.aai.introspection.Introspector;
@@ -38,6 +40,8 @@ import org.onap.aai.setup.SchemaVersions;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
public class MakeNamedQuery {
+
+ private static final EELFLogger logger = EELFManager.getInstance().getLogger(MakeNamedQuery.class.getName());
public static void main(String[] args) throws Exception {
String _apiVersion = AAIConfig.get(AAIConstants.AAI_DEFAULT_API_VERSION_PROP);
@@ -184,10 +188,10 @@ public class MakeNamedQuery {
nqElementList.add(newNQElement.getUnderlyingObject());
} catch (AAIUnknownObjectException e) {
- // TODO Auto-generated catch block
+ logger.info("AAIUnknownObjectException in MakeNamedQuery.setupNQElements() "+e);
e.printStackTrace();
} catch (IllegalArgumentException e) {
- // TODO Auto-generated catch block
+ logger.info("IllegalArgumentException in MakeNamedQuery.setupNQElements() "+e);
e.printStackTrace();
}
return newNQElement;
@@ -210,10 +214,10 @@ public class MakeNamedQuery {
}
} catch (AAIUnknownObjectException e) {
- // TODO Auto-generated catch block
+ logger.info("AAIUnknownObjectException in MakeNamedQuery.loadNQElement() "+e);
e.printStackTrace();
} catch (IllegalArgumentException e) {
- // TODO Auto-generated catch block
+ logger.info("IllegalArgumentException in MakeNamedQuery.loadNQElement() "+e);
e.printStackTrace();
}
return newNqElement;
@@ -242,10 +246,10 @@ public class MakeNamedQuery {
newRelationshipData.add(newRelationshipDatum1.getUnderlyingObject());
//newRelationshipData.add(newRelationshipDatum2.getUnderlyingObject());
} catch (AAIUnknownObjectException e) {
- // TODO Auto-generated catch block
+ logger.info("AAIUnknownObjectException in MakeNamedQuery.makeWidgetRelationship() "+e);
e.printStackTrace();
} catch (IllegalArgumentException e) {
- // TODO Auto-generated catch block
+ logger.info("IllegalArgumentException in MakeNamedQuery.makeWidgetRelationship() "+e);
e.printStackTrace();
}