This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag 
org.apache.sling.commons.classloader-1.2.0
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-classloader.git

commit 0ad21e6883b82e1afd87e1e942dbe74a4c789516
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Fri Mar 12 14:28:11 2010 +0000

    SLING-1435 :  After a NoClassDefError classes are still not found even if 
they have been installed in the meantime with Java 6
    
    git-svn-id: 
https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/classloader@922272 
13f79535-47bb-0310-9956-ffa450edef68
---
 .../java/org/apache/sling/commons/classloader/impl/Activator.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/src/main/java/org/apache/sling/commons/classloader/impl/Activator.java 
b/src/main/java/org/apache/sling/commons/classloader/impl/Activator.java
index 51af181..9ed2e91 100644
--- a/src/main/java/org/apache/sling/commons/classloader/impl/Activator.java
+++ b/src/main/java/org/apache/sling/commons/classloader/impl/Activator.java
@@ -108,11 +108,13 @@ public class Activator implements 
SynchronousBundleListener, BundleActivator {
      * @see 
org.osgi.framework.BundleListener#bundleChanged(org.osgi.framework.BundleEvent)
      */
     public void bundleChanged(BundleEvent event) {
-        boolean reload = false;
+        final boolean reload;
         if ( event.getType() == BundleEvent.RESOLVED ) {
             reload = this.service.hasUnresolvedPackages(event.getBundle());
-        } else if ( this.service.isBundleUsed(event.getBundle().getBundleId()) 
) {
-            reload = true;
+        } else if ( event.getType() == BundleEvent.UNRESOLVED ) {
+            reload = 
this.service.isBundleUsed(event.getBundle().getBundleId());
+        } else {
+            reload = false;
         }
         if ( reload ) {
             this.unregisterManagerFactory();

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to