karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject karaf git commit: [KARAF-5211] Prevent NPE in StoredWiringResolver when trying to delete bundle wiring
Date Fri, 23 Jun 2017 09:19:17 GMT
Repository: karaf
Updated Branches:
  refs/heads/master bf2a9e90b -> 85111bea1


[KARAF-5211] Prevent NPE in StoredWiringResolver when trying to delete bundle wiring


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/85111bea
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/85111bea
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/85111bea

Branch: refs/heads/master
Commit: 85111bea15554f795a08773f3184aabc8733e54c
Parents: bf2a9e9
Author: Jean-Baptiste Onofré <jbonofre@apache.org>
Authored: Fri Jun 23 11:18:45 2017 +0200
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Fri Jun 23 11:18:45 2017 +0200

----------------------------------------------------------------------
 .../apache/karaf/features/extension/StoredWiringResolver.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/85111bea/features/extension/src/main/java/org/apache/karaf/features/extension/StoredWiringResolver.java
----------------------------------------------------------------------
diff --git a/features/extension/src/main/java/org/apache/karaf/features/extension/StoredWiringResolver.java
b/features/extension/src/main/java/org/apache/karaf/features/extension/StoredWiringResolver.java
index ebbfe9c..0d7de17 100644
--- a/features/extension/src/main/java/org/apache/karaf/features/extension/StoredWiringResolver.java
+++ b/features/extension/src/main/java/org/apache/karaf/features/extension/StoredWiringResolver.java
@@ -108,6 +108,8 @@ class StoredWiringResolver implements ResolverHook {
     }
 
     synchronized void delete(Bundle bundle) {
-        wiring.get(bundle.getBundleId()).delete(path);
+        if (wiring.get(bundle.getBundleId()) != null) {
+            wiring.get(bundle.getBundleId()).delete(path);
+        }
     }
 }


Mime
View raw message