From 3d68ddf5eef032d6be17faa33096a92747e5cdd9 Mon Sep 17 00:00:00 2001 From: Benjamin Phillippe Date: Wed, 23 Oct 2013 13:03:25 -0500 Subject: [PATCH] Issue #1682 Fixed registry query that prevented deletions of subscriptions Change-Id: I92da9f43cfb86711d6238c07a86cad94742777f2 Former-commit-id: 142639abf74ea4e904f52745f4514f5693caa6b6 [formerly 9f03f26ad6db93a09f247ffc653c54ba2ce18e0f] [formerly 22c8ed7adde8e6a17ba274ad7d78ae8ee93b61a7] [formerly 142639abf74ea4e904f52745f4514f5693caa6b6 [formerly 9f03f26ad6db93a09f247ffc653c54ba2ce18e0f] [formerly 22c8ed7adde8e6a17ba274ad7d78ae8ee93b61a7] [formerly 3a3fb00f7813c4f203fb902e826018d9247ebd0a [formerly 22c8ed7adde8e6a17ba274ad7d78ae8ee93b61a7 [formerly b3ef0276414f5009f79e55e3b08c58daeeb56e26]]]] Former-commit-id: 3a3fb00f7813c4f203fb902e826018d9247ebd0a Former-commit-id: 2e77c00d1bacf67b883aaa48d1ab597ef622e770 [formerly 7eadbf5175a1acd7bf62dcedc3b1b3ec54a7c4d0] [formerly b4d42937ab7872a879f37d968df6b96635a96729 [formerly c07e7fac10e4f6f6de1677dc9567d64262b7c884]] Former-commit-id: 91a6dbf60ecf4e4ca9d31b92235b8a88719d9b0c [formerly 5538c94240f1eef04f979a969f5be1b35f2fd8a4] Former-commit-id: be2d06cefc56770191233e7c646eb2a284c5fc28 --- .../ebxml/services/query/plugins/FindAssociatedObjects.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/query/plugins/FindAssociatedObjects.java b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/query/plugins/FindAssociatedObjects.java index 7276cabc22..c89842b9e8 100644 --- a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/query/plugins/FindAssociatedObjects.java +++ b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/query/plugins/FindAssociatedObjects.java @@ -34,6 +34,7 @@ import oasis.names.tc.ebxml.regrep.xsd.rim.v4.QueryType; import oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryObjectType; import com.raytheon.uf.common.registry.EbxmlNamespaces; +import com.raytheon.uf.common.util.CollectionUtil; import com.raytheon.uf.edex.registry.ebxml.dao.RegistryObjectDao; import com.raytheon.uf.edex.registry.ebxml.exception.EbxmlRegistryException; import com.raytheon.uf.edex.registry.ebxml.services.query.QueryConstants; @@ -89,6 +90,7 @@ import com.raytheon.uf.edex.registry.ebxml.util.EbxmlExceptionUtil; * Apr 23, 2013 1910 djohnson Don't allow NPE on registry object list, remove non ANSI Javadoc. * 5/21/2013 2022 bphillip Set return type on call to findAssociations * 10/8/2013 1682 bphillip Refactored querying + * 10/23/2013 1682 bphillip Returns empty query result if no ids were found * * * @@ -163,6 +165,9 @@ public class FindAssociatedObjects extends RegistryQueryPlugin { } try { + if (CollectionUtil.isNullOrEmpty(ids)) { + return new QueryResponse(); + } return createResponse(registryObjectDao.getById(ids)); } catch (EbxmlRegistryException e) { throw EbxmlExceptionUtil.createMsgRegistryException(