[
https://issues.apache.org/jira/browse/FELIX-6388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17301479#comment-17301479
]
Carsten Ziegeler commented on FELIX-6388:
-----------------------------------------
I've fixed the originally reported exception by adding synchronized to the
close() method.I've also added an active flag to avoid listener thread creation
after close.
I added some extra code to handle the second case, but I fear there are more
potential NPEs hidden in the ConfigurationListenerImpl code
[~rotty3000] Could you please cross-check my change?
https://github.com/apache/felix-dev/commit/9417fc701c6a3a9b79900c0dbd3c468cd63daee5
> ERROR: Bundle org.apache.felix.log [4] EventDispatcher: Error during
> dispatch. (java.lang.NullPointerException)
> ---------------------------------------------------------------------------------------------------------------
>
> Key: FELIX-6388
> URL: https://issues.apache.org/jira/browse/FELIX-6388
> Project: Felix
> Issue Type: Bug
> Components: Log Service
> Affects Versions: log-1.2.4
> Reporter: Rakesh Kumar
> Assignee: Carsten Ziegeler
> Priority: Major
> Fix For: log-1.2.6
>
>
> This exception happened when Felix was being shutdown.
> {code:java}
> ERROR: Bundle org.apache.felix.log [4] EventDispatcher: Error during
> dispatch. (java.lang.NullPointerException)
> java.lang.NullPointerException
> at org.apache.felix.log.Log.addEntry(Log.java:113)
> at org.apache.felix.log.Log.log(Log.java:92)
> at org.apache.felix.log.Log.bundleChanged(Log.java:266)
> at
> org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915)
> at
> org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834)
> at
> org.apache.felix.framework.EventDispatcher.run(EventDispatcher.java:1147)
> at
> org.apache.felix.framework.EventDispatcher.access$000(EventDispatcher.java:54)
> at
> org.apache.felix.framework.EventDispatcher$1.run(EventDispatcher.java:102)
> at java.base/java.lang.Thread.run(Thread.java:834) {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)