summaryrefslogtreecommitdiffstats
path: root/aai-core/src
diff options
context:
space:
mode:
authorKajur, Harish (vk250x) <vk250x@att.com>2019-04-10 16:44:17 -0400
committerKajur, Harish (vk250x) <vk250x@att.com>2019-04-10 16:44:21 -0400
commit86182472f813568d0eaeb6367f53bedc0120f7ee (patch)
treeea19e87b9769b774142182563e4e86662663f0f5 /aai-core/src
parent3b3bfd2cb38628532970c56b52b08d31bec35a18 (diff)
Update DBSerializer to properly deal1.4.3
with adding relationships to edge rules in older versions of the api that might not be in the latest versions of the API Issue-ID: AAI-2325 Change-Id: I78fa1c747c4c52a01d2d6ed762e0dc4cdf448fee Signed-off-by: Kajur, Harish (vk250x) <vk250x@att.com>
Diffstat (limited to 'aai-core/src')
-rw-r--r--aai-core/src/main/java/org/onap/aai/serialization/db/DBSerializer.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/aai-core/src/main/java/org/onap/aai/serialization/db/DBSerializer.java b/aai-core/src/main/java/org/onap/aai/serialization/db/DBSerializer.java
index feb2aace..7a941c69 100644
--- a/aai-core/src/main/java/org/onap/aai/serialization/db/DBSerializer.java
+++ b/aai-core/src/main/java/org/onap/aai/serialization/db/DBSerializer.java
@@ -1302,7 +1302,18 @@ public class DBSerializer {
}
public void addRelatedToProperty(Introspector relationship, Vertex cousinVertex, String cousinType) throws AAIUnknownObjectException {
- Introspector obj = this.latestLoader.introspectorFromName(cousinType);
+
+ Introspector obj = null;
+
+ try {
+ obj = this.loader.introspectorFromName(cousinType);
+ } catch(AAIUnknownObjectException ex){
+ if(LOGGER.isTraceEnabled()){
+ LOGGER.trace("Encountered unknown object exception when trying to load nodetype of {} for vertex id {}", cousinType, cousinVertex.id());
+ }
+ return;
+ }
+
String nameProps = obj.getMetadata(ObjectMetadata.NAME_PROPS);
List<Introspector> relatedToProperties = new ArrayList<>();