Added support for Multiple Edges
[aai/aai-common.git] / aai-core / src / main / java / org / onap / aai / rest / db / HttpEntry.java
index 634e44e..0d89a74 100644 (file)
@@ -461,14 +461,13 @@ public class HttpEntry {
        private Introspector getObjectFromDb(List<Vertex> results, DBSerializer serializer, QueryParser query, Introspector obj, URI uri, int depth, boolean nodeOnly, String cleanUp) throws AAIException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, SecurityException, InstantiationException, NoSuchMethodException, UnsupportedEncodingException, AAIUnknownObjectException, URISyntaxException {
         
         //nothing found
-        if (results.size() == 0) {
+        if (results.isEmpty()) {
                String msg = createNotFoundMessage(query.getResultType(), uri);
                        throw new AAIException("AAI_6114", msg);
         }
 
-        obj = serializer.dbToObject(results, obj, depth, nodeOnly, cleanUp);
+        return serializer.dbToObject(results, obj, depth, nodeOnly, cleanUp);
         
-        return obj;
        }