Repository: karaf-cellar Updated Branches: refs/heads/cellar-2.3.x 93f0a10f2 -> 356fcf30e
[KARAF-2550] Fix NPE in the handler at first sync Project: http://git-wip-us.apache.org/repos/asf/karaf-cellar/repo Commit: http://git-wip-us.apache.org/repos/asf/karaf-cellar/commit/356fcf30 Tree: http://git-wip-us.apache.org/repos/asf/karaf-cellar/tree/356fcf30 Diff: http://git-wip-us.apache.org/repos/asf/karaf-cellar/diff/356fcf30 Branch: refs/heads/cellar-2.3.x Commit: 356fcf30ebfe248271176a85165fda0f0d98518b Parents: 93f0a10 Author: Jean-Baptiste Onofré <[email protected]> Authored: Sun Jun 15 21:18:09 2014 +0200 Committer: Jean-Baptiste Onofré <[email protected]> Committed: Sun Jun 15 21:19:36 2014 +0200 ---------------------------------------------------------------------- .../org/apache/karaf/cellar/config/ConfigurationEventHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/356fcf30/config/src/main/java/org/apache/karaf/cellar/config/ConfigurationEventHandler.java ---------------------------------------------------------------------- diff --git a/config/src/main/java/org/apache/karaf/cellar/config/ConfigurationEventHandler.java b/config/src/main/java/org/apache/karaf/cellar/config/ConfigurationEventHandler.java index ca54078..9340343 100644 --- a/config/src/main/java/org/apache/karaf/cellar/config/ConfigurationEventHandler.java +++ b/config/src/main/java/org/apache/karaf/cellar/config/ConfigurationEventHandler.java @@ -68,7 +68,7 @@ public class ConfigurationEventHandler extends ConfigurationSupport implements E try { // update the local configuration Configuration[] localConfigurations = configurationAdmin.listConfigurations("(service.pid=" + pid + ")"); - if (event.getType() == ConfigurationEvent.CM_DELETED) { + if (event.getType() != null && event.getType() == ConfigurationEvent.CM_DELETED) { // delete the configuration if (localConfigurations != null && localConfigurations.length > 0) { localConfigurations[0].delete();
