diff options
author | Steven Blimkie <Steven.Blimkie@amdocs.com> | 2019-02-20 16:48:48 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-02-20 16:48:48 +0000 |
commit | 911ff8d32b998806427c20bae84115d2401192a0 (patch) | |
tree | d1e724d36f652c0e1db68fe08b4c9dc1b9b8e261 | |
parent | 93c5b14de5d363ea6ee803b7fe8820c29ab79963 (diff) | |
parent | 4e418d684db244939d0a4d1df479b8935e085a96 (diff) |
Merge "Added error logger in exception scenario"
-rw-r--r-- | src/main/java/org/onap/aai/spike/schema/RelationshipSchema.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/org/onap/aai/spike/schema/RelationshipSchema.java b/src/main/java/org/onap/aai/spike/schema/RelationshipSchema.java index 6858783..7cddcb5 100644 --- a/src/main/java/org/onap/aai/spike/schema/RelationshipSchema.java +++ b/src/main/java/org/onap/aai/spike/schema/RelationshipSchema.java @@ -1,5 +1,4 @@ /** - * ============LICENSE_START======================================================= * Gizmo * ================================================================================ * Copyright © 2017 AT&T Intellectual Property. @@ -33,19 +32,23 @@ import java.util.stream.Collectors; import com.google.common.collect.Multimap; import com.google.gson.Gson; import com.google.gson.GsonBuilder; +import org.onap.aai.cl.eelf.LoggerFactory; import org.codehaus.jackson.map.ObjectMapper; import org.onap.aai.edges.EdgeRule; import org.onap.aai.spike.exception.SpikeException; +import org.onap.aai.spike.logging.SpikeMsgs; public class RelationshipSchema { - private static final Gson gson = new GsonBuilder().create(); + public static final String SCHEMA_SOURCE_NODE_TYPE = "from"; public static final String SCHEMA_TARGET_NODE_TYPE = "to"; public static final String SCHEMA_RELATIONSHIP_TYPE = "label"; public static final String SCHEMA_RULES_ARRAY = "rules"; + private static org.onap.aai.cl.api.Logger logger = + LoggerFactory.getInstance().getLogger(RelationshipSchema.class.getName()); private Map<String, Map<String, Class<?>>> relations = new HashMap<>(); /** @@ -61,7 +64,7 @@ public class RelationshipSchema { try { return resolveClass(p.getValue()); } catch (SpikeException | ClassNotFoundException e) { - e.printStackTrace(); + logger.error(SpikeMsgs.OXM_LOAD_ERROR, "Error in RelationshipSchema: " + e); } return null; })); @@ -85,7 +88,7 @@ public class RelationshipSchema { try { return resolveClass(p.getValue()); } catch (SpikeException | ClassNotFoundException e) { - e.printStackTrace(); + logger.error(SpikeMsgs.OXM_LOAD_ERROR, "Error in RelationshipSchema: " + e); } return null; })); |