diff options
author | James Forsyth <jf2512@att.com> | 2019-01-18 20:50:48 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-01-18 20:50:48 +0000 |
commit | a0bbb93ab59028e603257351945822084cc490fd (patch) | |
tree | 239f077b7d2ecc067b4cd177697bc6024b601534 /aai-traversal/src/main | |
parent | 16b48ab05e63fca707585b4ecee466b8b7721a1b (diff) | |
parent | 0d5e5b2130b0b3e0d3b4b882acf8d141e7dc215d (diff) |
Merge "Sonar Critical: Use Logger and log the exception"
Diffstat (limited to 'aai-traversal/src/main')
-rw-r--r-- | aai-traversal/src/main/java/org/onap/aai/util/MakeNamedQuery.java | 16 |
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(); } |