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 2017/04/19 13:37:10 UTC
karaf-cellar git commit: [KARAF-4908] Prevent NPE in
FeaturesSynchronizer
Repository: karaf-cellar
Updated Branches:
refs/heads/master ef1691907 -> 037c697a2
[KARAF-4908] Prevent NPE in FeaturesSynchronizer
Project: http://git-wip-us.apache.org/repos/asf/karaf-cellar/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf-cellar/commit/037c697a
Tree: http://git-wip-us.apache.org/repos/asf/karaf-cellar/tree/037c697a
Diff: http://git-wip-us.apache.org/repos/asf/karaf-cellar/diff/037c697a
Branch: refs/heads/master
Commit: 037c697a20cc5dbd422c9f011c7de4307696f8be
Parents: ef16919
Author: Jean-Baptiste Onofr� <jb...@apache.org>
Authored: Wed Apr 19 15:36:52 2017 +0200
Committer: Jean-Baptiste Onofr� <jb...@apache.org>
Committed: Wed Apr 19 15:36:52 2017 +0200
----------------------------------------------------------------------
.../org/apache/karaf/cellar/features/FeaturesSynchronizer.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/037c697a/features/src/main/java/org/apache/karaf/cellar/features/FeaturesSynchronizer.java
----------------------------------------------------------------------
diff --git a/features/src/main/java/org/apache/karaf/cellar/features/FeaturesSynchronizer.java b/features/src/main/java/org/apache/karaf/cellar/features/FeaturesSynchronizer.java
index 7524309..88abe5f 100644
--- a/features/src/main/java/org/apache/karaf/cellar/features/FeaturesSynchronizer.java
+++ b/features/src/main/java/org/apache/karaf/cellar/features/FeaturesSynchronizer.java
@@ -322,7 +322,9 @@ public class FeaturesSynchronizer extends FeaturesSupport implements Synchronize
Dictionary<String, Object> properties = configuration.getProperties();
if (properties != null) {
String propertyKey = groupName + Configurations.SEPARATOR + Constants.CATEGORY + Configurations.SEPARATOR + Configurations.SYNC;
- return properties.get(propertyKey).toString();
+ if (properties.get(propertyKey) != null) {
+ return properties.get(propertyKey).toString();
+ }
}
} catch (IOException e) {
LOGGER.error("CELLAR FEATURE: error while retrieving the sync policy", e);