commit | 57854841b2bb0b618e55f7155926f1ad1bb86364 | [log] [tgz] |
---|---|---|
author | Marcel Offermans <marrs@apache.org> | Fri Jan 21 12:15:53 2011 +0000 |
committer | Marcel Offermans <marrs@apache.org> | Fri Jan 21 12:15:53 2011 +0000 |
tree | fe7f56e96e60aff3e14ab3ccf3e19a9d577c07ab | |
parent | 12434de850c6325d21e1685c44d306175159132b [diff] |
When the resource processor gets a resource that contains no Designates, which might be a bit strange but is allowed according to the spec, the processor throws a NPE, when it should just not do any processing. This change does just that, and logs the fact that there are no Designates. git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1061781 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/deploymentadmin/autoconf/src/main/java/org/apache/felix/deployment/rp/autoconf/AutoConfResourceProcessor.java b/deploymentadmin/autoconf/src/main/java/org/apache/felix/deployment/rp/autoconf/AutoConfResourceProcessor.java index d34375b..980c090 100644 --- a/deploymentadmin/autoconf/src/main/java/org/apache/felix/deployment/rp/autoconf/AutoConfResourceProcessor.java +++ b/deploymentadmin/autoconf/src/main/java/org/apache/felix/deployment/rp/autoconf/AutoConfResourceProcessor.java
@@ -100,6 +100,11 @@ // process resources Map designates = data.getDesignates(); + if (designates == null) { + // if there are no designates, there's nothing to process + m_log.log(LogService.LOG_INFO, "No designates found in the resource, so there's nothing to process."); + return; + } Map localOcds = data.getObjectClassDefinitions(); Iterator i = designates.keySet().iterator(); while (i.hasNext()) {