Return-Path: X-Original-To: apmail-sling-commits-archive@www.apache.org Delivered-To: apmail-sling-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ADB12949A for ; Tue, 20 Dec 2011 16:56:15 +0000 (UTC) Received: (qmail 20346 invoked by uid 500); 20 Dec 2011 16:56:15 -0000 Delivered-To: apmail-sling-commits-archive@sling.apache.org Received: (qmail 20285 invoked by uid 500); 20 Dec 2011 16:56:15 -0000 Mailing-List: contact commits-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list commits@sling.apache.org Received: (qmail 20278 invoked by uid 99); 20 Dec 2011 16:56:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Dec 2011 16:56:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Dec 2011 16:56:14 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 03BBE2388A36; Tue, 20 Dec 2011 16:55:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@sling.apache.org From: cziegeler@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111220165554.03BBE2388A36@eris.apache.org> 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;