sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1649493 - /sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/OsgiInstallerImpl.java
Date Mon, 05 Jan 2015 10:11:41 GMT
Author: cziegeler
Date: Mon Jan  5 10:11:41 2015
New Revision: 1649493

URL: http://svn.apache.org/r1649493
Log:
SLING-4279 : Events through the ResourceChangeListener might not be processed immediately

Modified:
    sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/OsgiInstallerImpl.java

Modified: sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/OsgiInstallerImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/OsgiInstallerImpl.java?rev=1649493&r1=1649492&r2=1649493&view=diff
==============================================================================
--- sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/OsgiInstallerImpl.java
(original)
+++ sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/OsgiInstallerImpl.java
Mon Jan  5 10:11:41 2015
@@ -102,6 +102,9 @@ implements OsgiInstaller, ResourceChange
     /** Removed resources from clients. */
     private final Set<String> urlsToRemove = new HashSet<String>();
 
+    /** Update infos to process. */
+    private final List<UpdateInfo> updateInfos = new ArrayList<OsgiInstallerImpl.UpdateInfo>();
+
     /** Are we still activate? */
     private volatile boolean active = true;
 
@@ -310,7 +313,10 @@ implements OsgiInstaller, ResourceChange
      * This method should only be invoked from within a synchronized (newResources) block!
      */
     private boolean hasNewResources() {
-        return !this.newResources.isEmpty() || !this.newResourcesSchemes.isEmpty() || !this.urlsToRemove.isEmpty();
+        return !this.newResources.isEmpty()
+            || !this.newResourcesSchemes.isEmpty()
+            || !this.urlsToRemove.isEmpty()
+            || !this.updateInfos.isEmpty();
     }
 
     /**
@@ -935,8 +941,6 @@ implements OsgiInstaller, ResourceChange
         public Map<String, Object> attributes;
     }
 
-    private final List<UpdateInfo> updateInfos = new ArrayList<OsgiInstallerImpl.UpdateInfo>();
-
     /**
      * Store the changes in an internal queue, the queue is processed in {@link #processUpdateInfos()}.
      * @see org.apache.sling.installer.api.ResourceChangeListener#resourceAddedOrUpdated(java.lang.String,
java.lang.String, java.io.InputStream, java.util.Dictionary, Map)



Mime
View raw message