karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject [05/11] karaf git commit: Add some doc when to not hold a lock
Date Mon, 15 May 2017 13:12:05 GMT
Add some doc when to not hold a lock

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

Branch: refs/heads/master
Commit: 66d85a72d806b20e8db24ef277f63da926ae5639
Parents: cba50b4
Author: Guillaume Nodet <gnodet@apache.org>
Authored: Mon May 15 14:31:46 2017 +0200
Committer: Guillaume Nodet <gnodet@apache.org>
Committed: Mon May 15 14:31:46 2017 +0200

----------------------------------------------------------------------
 .../features/internal/service/FeaturesServiceImpl.java  | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/66d85a72/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
index 2b18c21..ce318ac 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
@@ -403,6 +403,9 @@ public class FeaturesServiceImpl implements FeaturesService, Deployer.DeployCall
         deploymentListeners.remove(listener);
     }
 
+    /*
+     * Should never be called while holding a lock as we're calling outside our bundle.
+     */
     @Override
     public void callListeners(FeatureEvent event) {
         if (eventAdminListener != null) {
@@ -413,6 +416,9 @@ public class FeaturesServiceImpl implements FeaturesService, Deployer.DeployCall
         }
     }
 
+    /*
+     * Should never be called while holding a lock as we're calling outside our bundle.
+     */
     @Override
     public void callListeners(DeploymentEvent event) {
         lastDeploymentEvent = event;
@@ -425,6 +431,9 @@ public class FeaturesServiceImpl implements FeaturesService, Deployer.DeployCall
         }
     }
 
+    /*
+     * Should never be called while holding a lock as we're calling outside our bundle.
+     */
     protected void callListeners(RepositoryEvent event) {
         if (eventAdminListener != null) {
             eventAdminListener.repositoryEvent(event);
@@ -698,6 +707,9 @@ public class FeaturesServiceImpl implements FeaturesService, Deployer.DeployCall
         return flattenFeatures(allFeatures);
     }
 
+    /**
+     * Should not be called while holding a lock.
+     */
     protected Map<String, Map<String, Feature>> getFeatures() throws Exception
{
         List<String> uris;
         synchronized (lock) {


Mime
View raw message