You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "J.W. Janssen (Created) (JIRA)" <ji...@apache.org> on 2012/01/31 17:23:10 UTC

[jira] [Created] (FELIX-3334) PreferencesManager can throw NPE after being stopped.

PreferencesManager can throw NPE after being stopped.
-----------------------------------------------------

                 Key: FELIX-3334
                 URL: https://issues.apache.org/jira/browse/FELIX-3334
             Project: Felix
          Issue Type: Bug
          Components: Preferences Service
    Affects Versions: prefs-1.0.4
            Reporter: J.W. Janssen
         Attachments: quickfix.patch

PreferencesManager#bundleChanged tries to intercept bundles that are uninstalled. However, if the PreferencesManager itself is stopped, it does not unregister itself as bundle listener, causing possible NPEs when other bundles depending on the preferences service are stopped later on, for example during a shutdown.

I've got a patch available, will attach it to this issue to be applied.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (FELIX-3334) PreferencesManager can throw NPE after being stopped.

Posted by "J.W. Janssen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

J.W. Janssen updated FELIX-3334:
--------------------------------

    Attachment:     (was: quickfix.patch)
    
> PreferencesManager can throw NPE after being stopped.
> -----------------------------------------------------
>
>                 Key: FELIX-3334
>                 URL: https://issues.apache.org/jira/browse/FELIX-3334
>             Project: Felix
>          Issue Type: Bug
>          Components: Preferences Service
>    Affects Versions: prefs-1.0.4
>            Reporter: J.W. Janssen
>              Labels: patch
>         Attachments: quickfix-new.patch
>
>
> PreferencesManager#bundleChanged tries to intercept bundles that are uninstalled. However, if the PreferencesManager itself is stopped, it does not unregister itself as bundle listener, causing possible NPEs when other bundles depending on the preferences service are stopped later on, for example during a shutdown.
> I've got a patch available, will attach it to this issue to be applied.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3334) PreferencesManager can throw NPE after being stopped.

Posted by "Marcel Offermans (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227491#comment-13227491 ] 

Marcel Offermans commented on FELIX-3334:
-----------------------------------------

Applied this patch with a small change:
To prevent a possible race condition when "this.storeTracker" is nulled whilst in the middle of this method, I read the member once into a local variable and use that throughout the rest of the codebase.
To be honest, I have the feeling that there are other possible concurrency issues in this code, but for now I wanted to allow J.W. to test his patch.
@Carsten/@Felix WDYT?
                
> PreferencesManager can throw NPE after being stopped.
> -----------------------------------------------------
>
>                 Key: FELIX-3334
>                 URL: https://issues.apache.org/jira/browse/FELIX-3334
>             Project: Felix
>          Issue Type: Bug
>          Components: Preferences Service
>    Affects Versions: prefs-1.0.4
>            Reporter: J.W. Janssen
>            Assignee: Carsten Ziegeler
>              Labels: patch
>             Fix For: prefs-1.0.6
>
>         Attachments: felix-prefs-3334-2.patch, quickfix-new.patch
>
>
> PreferencesManager#bundleChanged tries to intercept bundles that are uninstalled. However, if the PreferencesManager itself is stopped, it does not unregister itself as bundle listener, causing possible NPEs when other bundles depending on the preferences service are stopped later on, for example during a shutdown.
> I've got a patch available, will attach it to this issue to be applied.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3334) PreferencesManager can throw NPE after being stopped.

Posted by "Felix Meschberger (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13197641#comment-13197641 ] 

Felix Meschberger commented on FELIX-3334:
------------------------------------------

A bundle being stopped is automatically unregistered as a bundle listener but only after having called the stop method of the BundleActivator.

Looking at the code, chances are minimal (if there is a concurrency between event handling and handling stop), but this would not be 100% solved by the patch (because an event might still be coming in.

A better fix would be to check for the null-situation in the event handler when accessing the store.

Did you actually encounter an NPE ?
                
> PreferencesManager can throw NPE after being stopped.
> -----------------------------------------------------
>
>                 Key: FELIX-3334
>                 URL: https://issues.apache.org/jira/browse/FELIX-3334
>             Project: Felix
>          Issue Type: Bug
>          Components: Preferences Service
>    Affects Versions: prefs-1.0.4
>            Reporter: J.W. Janssen
>              Labels: patch
>         Attachments: quickfix.patch
>
>
> PreferencesManager#bundleChanged tries to intercept bundles that are uninstalled. However, if the PreferencesManager itself is stopped, it does not unregister itself as bundle listener, causing possible NPEs when other bundles depending on the preferences service are stopped later on, for example during a shutdown.
> I've got a patch available, will attach it to this issue to be applied.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (FELIX-3334) PreferencesManager can throw NPE after being stopped.

Posted by "Carsten Ziegeler (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227505#comment-13227505 ] 

Carsten Ziegeler edited comment on FELIX-3334 at 3/12/12 1:26 PM:
------------------------------------------------------------------

To be honest, i'm not using this implementation very intensively, so chances are that there are more concurrency issues.
I'm wondering if we need the support for different stores at all or just go with the default store and are done. So far I haven't heard that someone is using its own store implementation
                
      was (Author: cziegeler):
    To be honest, i'm not using this implementation very intensively, so changes are that there are more concurrency issues.
I'm wondering f we need the support for different stores at all or just go with the default store and are done. So far I haven't heard that someone is using its own store implementation
                  
> PreferencesManager can throw NPE after being stopped.
> -----------------------------------------------------
>
>                 Key: FELIX-3334
>                 URL: https://issues.apache.org/jira/browse/FELIX-3334
>             Project: Felix
>          Issue Type: Bug
>          Components: Preferences Service
>    Affects Versions: prefs-1.0.4
>            Reporter: J.W. Janssen
>            Assignee: Carsten Ziegeler
>              Labels: patch
>             Fix For: prefs-1.0.6
>
>         Attachments: felix-prefs-3334-2.patch, quickfix-new.patch
>
>
> PreferencesManager#bundleChanged tries to intercept bundles that are uninstalled. However, if the PreferencesManager itself is stopped, it does not unregister itself as bundle listener, causing possible NPEs when other bundles depending on the preferences service are stopped later on, for example during a shutdown.
> I've got a patch available, will attach it to this issue to be applied.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (FELIX-3334) PreferencesManager can throw NPE after being stopped.

Posted by "J.W. Janssen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

J.W. Janssen updated FELIX-3334:
--------------------------------

    Attachment: quickfix-new.patch
    
> PreferencesManager can throw NPE after being stopped.
> -----------------------------------------------------
>
>                 Key: FELIX-3334
>                 URL: https://issues.apache.org/jira/browse/FELIX-3334
>             Project: Felix
>          Issue Type: Bug
>          Components: Preferences Service
>    Affects Versions: prefs-1.0.4
>            Reporter: J.W. Janssen
>              Labels: patch
>         Attachments: quickfix-new.patch, quickfix.patch
>
>
> PreferencesManager#bundleChanged tries to intercept bundles that are uninstalled. However, if the PreferencesManager itself is stopped, it does not unregister itself as bundle listener, causing possible NPEs when other bundles depending on the preferences service are stopped later on, for example during a shutdown.
> I've got a patch available, will attach it to this issue to be applied.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (FELIX-3334) PreferencesManager can throw NPE after being stopped.

Posted by "J.W. Janssen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

J.W. Janssen updated FELIX-3334:
--------------------------------

    Attachment: quickfix.patch

A simple fix for this issue.
                
> PreferencesManager can throw NPE after being stopped.
> -----------------------------------------------------
>
>                 Key: FELIX-3334
>                 URL: https://issues.apache.org/jira/browse/FELIX-3334
>             Project: Felix
>          Issue Type: Bug
>          Components: Preferences Service
>    Affects Versions: prefs-1.0.4
>            Reporter: J.W. Janssen
>              Labels: patch
>         Attachments: quickfix.patch
>
>
> PreferencesManager#bundleChanged tries to intercept bundles that are uninstalled. However, if the PreferencesManager itself is stopped, it does not unregister itself as bundle listener, causing possible NPEs when other bundles depending on the preferences service are stopped later on, for example during a shutdown.
> I've got a patch available, will attach it to this issue to be applied.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3334) PreferencesManager can throw NPE after being stopped.

Posted by "Marcel Offermans (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227521#comment-13227521 ] 

Marcel Offermans commented on FELIX-3334:
-----------------------------------------

Can't speak for everybody, but I actually like the fact that you can plug-in a different store implementation. I don't think it structurally causes problems (other than the fact that it slightly complicates the design and leaves us with questions like "what should happen if the backing store changes or goes away). The concurrency issues are things we should keep working on. In any case we're actively using prefs in http://amdatu.org/ so we'll keep contributing patches whenever we run into something.
                
> PreferencesManager can throw NPE after being stopped.
> -----------------------------------------------------
>
>                 Key: FELIX-3334
>                 URL: https://issues.apache.org/jira/browse/FELIX-3334
>             Project: Felix
>          Issue Type: Bug
>          Components: Preferences Service
>    Affects Versions: prefs-1.0.4
>            Reporter: J.W. Janssen
>            Assignee: Carsten Ziegeler
>              Labels: patch
>             Fix For: prefs-1.0.6
>
>         Attachments: felix-prefs-3334-2.patch, quickfix-new.patch
>
>
> PreferencesManager#bundleChanged tries to intercept bundles that are uninstalled. However, if the PreferencesManager itself is stopped, it does not unregister itself as bundle listener, causing possible NPEs when other bundles depending on the preferences service are stopped later on, for example during a shutdown.
> I've got a patch available, will attach it to this issue to be applied.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (FELIX-3334) PreferencesManager can throw NPE after being stopped.

Posted by "J.W. Janssen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

J.W. Janssen updated FELIX-3334:
--------------------------------

    Attachment: felix-prefs-3334-2.patch

Trivial patch to support my previous comment.
                
> PreferencesManager can throw NPE after being stopped.
> -----------------------------------------------------
>
>                 Key: FELIX-3334
>                 URL: https://issues.apache.org/jira/browse/FELIX-3334
>             Project: Felix
>          Issue Type: Bug
>          Components: Preferences Service
>    Affects Versions: prefs-1.0.4
>            Reporter: J.W. Janssen
>            Assignee: Carsten Ziegeler
>              Labels: patch
>             Fix For: prefs-1.0.6
>
>         Attachments: felix-prefs-3334-2.patch, quickfix-new.patch
>
>
> PreferencesManager#bundleChanged tries to intercept bundles that are uninstalled. However, if the PreferencesManager itself is stopped, it does not unregister itself as bundle listener, causing possible NPEs when other bundles depending on the preferences service are stopped later on, for example during a shutdown.
> I've got a patch available, will attach it to this issue to be applied.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (FELIX-3334) PreferencesManager can throw NPE after being stopped.

Posted by "Carsten Ziegeler (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler reassigned FELIX-3334:
---------------------------------------

    Assignee: Carsten Ziegeler
    
> PreferencesManager can throw NPE after being stopped.
> -----------------------------------------------------
>
>                 Key: FELIX-3334
>                 URL: https://issues.apache.org/jira/browse/FELIX-3334
>             Project: Felix
>          Issue Type: Bug
>          Components: Preferences Service
>    Affects Versions: prefs-1.0.4
>            Reporter: J.W. Janssen
>            Assignee: Carsten Ziegeler
>              Labels: patch
>         Attachments: quickfix-new.patch
>
>
> PreferencesManager#bundleChanged tries to intercept bundles that are uninstalled. However, if the PreferencesManager itself is stopped, it does not unregister itself as bundle listener, causing possible NPEs when other bundles depending on the preferences service are stopped later on, for example during a shutdown.
> I've got a patch available, will attach it to this issue to be applied.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (FELIX-3334) PreferencesManager can throw NPE after being stopped.

Posted by "J.W. Janssen (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13197004#comment-13197004 ] 

J.W. Janssen edited comment on FELIX-3334 at 1/31/12 4:26 PM:
--------------------------------------------------------------

A simple fix for this issue is attached.
                
      was (Author: jajans):
    A simple fix for this issue.
                  
> PreferencesManager can throw NPE after being stopped.
> -----------------------------------------------------
>
>                 Key: FELIX-3334
>                 URL: https://issues.apache.org/jira/browse/FELIX-3334
>             Project: Felix
>          Issue Type: Bug
>          Components: Preferences Service
>    Affects Versions: prefs-1.0.4
>            Reporter: J.W. Janssen
>              Labels: patch
>         Attachments: quickfix.patch
>
>
> PreferencesManager#bundleChanged tries to intercept bundles that are uninstalled. However, if the PreferencesManager itself is stopped, it does not unregister itself as bundle listener, causing possible NPEs when other bundles depending on the preferences service are stopped later on, for example during a shutdown.
> I've got a patch available, will attach it to this issue to be applied.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3334) PreferencesManager can throw NPE after being stopped.

Posted by "Carsten Ziegeler (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227505#comment-13227505 ] 

Carsten Ziegeler commented on FELIX-3334:
-----------------------------------------

To be honest, i'm not using this implementation very intensively, so changes are that there are more concurrency issues.
I'm wondering f we need the support for different stores at all or just go with the default store and are done. So far I haven't heard that someone is using its own store implementation
                
> PreferencesManager can throw NPE after being stopped.
> -----------------------------------------------------
>
>                 Key: FELIX-3334
>                 URL: https://issues.apache.org/jira/browse/FELIX-3334
>             Project: Felix
>          Issue Type: Bug
>          Components: Preferences Service
>    Affects Versions: prefs-1.0.4
>            Reporter: J.W. Janssen
>            Assignee: Carsten Ziegeler
>              Labels: patch
>             Fix For: prefs-1.0.6
>
>         Attachments: felix-prefs-3334-2.patch, quickfix-new.patch
>
>
> PreferencesManager#bundleChanged tries to intercept bundles that are uninstalled. However, if the PreferencesManager itself is stopped, it does not unregister itself as bundle listener, causing possible NPEs when other bundles depending on the preferences service are stopped later on, for example during a shutdown.
> I've got a patch available, will attach it to this issue to be applied.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3334) PreferencesManager can throw NPE after being stopped.

Posted by "Carsten Ziegeler (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227525#comment-13227525 ] 

Carsten Ziegeler commented on FELIX-3334:
-----------------------------------------

Yeah, I liked this feature as well but I fear those questions in reality. A lot of interesting things could happen which in most cases might be unwanted.
Maybe we should just use a different way of pluggability which allows for more predictable scenarios:
- moving the default implementation of the store into a separate bundle and making the dependency required would be one solution
- require people to create their own prefs bundle where the store impl has to be inside the prefs bundle would be another one
Not nice either....

                
> PreferencesManager can throw NPE after being stopped.
> -----------------------------------------------------
>
>                 Key: FELIX-3334
>                 URL: https://issues.apache.org/jira/browse/FELIX-3334
>             Project: Felix
>          Issue Type: Bug
>          Components: Preferences Service
>    Affects Versions: prefs-1.0.4
>            Reporter: J.W. Janssen
>            Assignee: Carsten Ziegeler
>              Labels: patch
>             Fix For: prefs-1.0.6
>
>         Attachments: felix-prefs-3334-2.patch, quickfix-new.patch
>
>
> PreferencesManager#bundleChanged tries to intercept bundles that are uninstalled. However, if the PreferencesManager itself is stopped, it does not unregister itself as bundle listener, causing possible NPEs when other bundles depending on the preferences service are stopped later on, for example during a shutdown.
> I've got a patch available, will attach it to this issue to be applied.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3334) PreferencesManager can throw NPE after being stopped.

Posted by "J.W. Janssen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13201617#comment-13201617 ] 

J.W. Janssen commented on FELIX-3334:
-------------------------------------

@Felix: you're right; I was too early with my conclusion. The spec clearly says that bundles are to be unregistered automatically as listeners after being stopped.

We actually do encounter the NPE, but we're running multiple instances of the PreferenceService to provide this service in a multi-tenant situation. That said, we also encountered situations that the original fix did not fix the problem either. So, I've changed the code to test for null, which does resolve the issue for our situation.


                
> PreferencesManager can throw NPE after being stopped.
> -----------------------------------------------------
>
>                 Key: FELIX-3334
>                 URL: https://issues.apache.org/jira/browse/FELIX-3334
>             Project: Felix
>          Issue Type: Bug
>          Components: Preferences Service
>    Affects Versions: prefs-1.0.4
>            Reporter: J.W. Janssen
>              Labels: patch
>         Attachments: quickfix-new.patch, quickfix.patch
>
>
> PreferencesManager#bundleChanged tries to intercept bundles that are uninstalled. However, if the PreferencesManager itself is stopped, it does not unregister itself as bundle listener, causing possible NPEs when other bundles depending on the preferences service are stopped later on, for example during a shutdown.
> I've got a patch available, will attach it to this issue to be applied.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (FELIX-3334) PreferencesManager can throw NPE after being stopped.

Posted by "J.W. Janssen (Reopened) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

J.W. Janssen reopened FELIX-3334:
---------------------------------


I'm reopening this issue after giving my earlier fix yet another thought. From field tests it appears that other NPEs can occur even with my earlier fix.

Why not let the BackingStoreManager#getStore() throw an BackingStoreException if there is no backing store service tracker available?

While it would mean a (internal) API-change, all usages of the #getStore() method would only yield an exception if used after the bundle has being stopped. We could try to cover all usages of #getStore() with a null-check as well, but would make the code (IMO) more complicated than necessary?!

I've investigated the impact of this change, and found that all places where #getStore() is called already handle or throw a BackingStoreException, making it a trivial change.
                
> PreferencesManager can throw NPE after being stopped.
> -----------------------------------------------------
>
>                 Key: FELIX-3334
>                 URL: https://issues.apache.org/jira/browse/FELIX-3334
>             Project: Felix
>          Issue Type: Bug
>          Components: Preferences Service
>    Affects Versions: prefs-1.0.4
>            Reporter: J.W. Janssen
>            Assignee: Carsten Ziegeler
>              Labels: patch
>             Fix For: prefs-1.0.6
>
>         Attachments: felix-prefs-3334-2.patch, quickfix-new.patch
>
>
> PreferencesManager#bundleChanged tries to intercept bundles that are uninstalled. However, if the PreferencesManager itself is stopped, it does not unregister itself as bundle listener, causing possible NPEs when other bundles depending on the preferences service are stopped later on, for example during a shutdown.
> I've got a patch available, will attach it to this issue to be applied.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (FELIX-3334) PreferencesManager can throw NPE after being stopped.

Posted by "Carsten Ziegeler (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler resolved FELIX-3334.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: prefs-1.0.6

Thanks for your patch. I've applied it in revision 1241796
                
> PreferencesManager can throw NPE after being stopped.
> -----------------------------------------------------
>
>                 Key: FELIX-3334
>                 URL: https://issues.apache.org/jira/browse/FELIX-3334
>             Project: Felix
>          Issue Type: Bug
>          Components: Preferences Service
>    Affects Versions: prefs-1.0.4
>            Reporter: J.W. Janssen
>            Assignee: Carsten Ziegeler
>              Labels: patch
>             Fix For: prefs-1.0.6
>
>         Attachments: quickfix-new.patch
>
>
> PreferencesManager#bundleChanged tries to intercept bundles that are uninstalled. However, if the PreferencesManager itself is stopped, it does not unregister itself as bundle listener, causing possible NPEs when other bundles depending on the preferences service are stopped later on, for example during a shutdown.
> I've got a patch available, will attach it to this issue to be applied.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira