incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1221338 - /sling/trunk/bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterWebConsolePlugin.java
Date Tue, 20 Dec 2011 16:55:53 GMT
Author: cziegeler
Date: Tue Dec 20 16:55:53 2011
New Revision: 1221338

URL: http://svn.apache.org/viewvc?rev=1221338&view=rev
Log:
Unregister listener to avoid NPEs when this component is already disposed but events are coming
in

Modified:
    sling/trunk/bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterWebConsolePlugin.java

Modified: sling/trunk/bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterWebConsolePlugin.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterWebConsolePlugin.java?rev=1221338&r1=1221337&r2=1221338&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterWebConsolePlugin.java
(original)
+++ sling/trunk/bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterWebConsolePlugin.java
Tue Dec 20 16:55:53 2011
@@ -5,9 +5,9 @@
  * licenses this file to You under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -16,7 +16,8 @@
  */
 package org.apache.sling.adapter.internal;
 
-import static org.apache.sling.api.adapter.AdapterFactory.*;
+import static org.apache.sling.api.adapter.AdapterFactory.ADAPTABLE_CLASSES;
+import static org.apache.sling.api.adapter.AdapterFactory.ADAPTER_CLASSES;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -202,6 +203,7 @@ public class AdapterWebConsolePlugin ext
     }
 
     protected void deactivate(ComponentContext ctx) {
+        this.bundleContext.removeBundleListener(this);
         this.adapterTracker.close();
         this.adapterServices = null;
         this.adapterBundles = null;



Mime
View raw message