You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2014/06/15 21:18:49 UTC
git commit: [KARAF-2550] Fix NPE in the handler at first sync
Repository: karaf-cellar
Updated Branches:
refs/heads/master 296d0cf05 -> d92c546e1
[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/d92c546e
Tree: http://git-wip-us.apache.org/repos/asf/karaf-cellar/tree/d92c546e
Diff: http://git-wip-us.apache.org/repos/asf/karaf-cellar/diff/d92c546e
Branch: refs/heads/master
Commit: d92c546e1a812b2a8e766c63d7577a8555056537
Parents: 296d0cf
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Sun Jun 15 21:18:09 2014 +0200
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Sun Jun 15 21:18:09 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/d92c546e/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 e1d87ad..6392504 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
@@ -75,7 +75,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();