felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (FELIX-1203) NPE in fileinstall if a watched bundle is uninstalled by some other means
Date Fri, 12 Jun 2009 15:28:36 GMT

     [ https://issues.apache.org/jira/browse/FELIX-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Richard S. Hall resolved FELIX-1203.
------------------------------------

    Resolution: Fixed
      Assignee: Richard S. Hall

I have applied this patch. Please close if satisfied. Thanks!

> NPE in fileinstall if a watched bundle is uninstalled by some other means
> -------------------------------------------------------------------------
>
>                 Key: FELIX-1203
>                 URL: https://issues.apache.org/jira/browse/FELIX-1203
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions:  fileinstall-1.0.0
>         Environment: generic
>            Reporter: Sahoo
>            Assignee: Richard S. Hall
>             Fix For: fileinstall-1.2.0
>
>         Attachments: FELIX-1203.txt
>
>
> test1.jar is part of watched dir /tmp/autodeploy-bundles/. I accidentally uninstalled
test1.jar bundle using the Shell command. Next time, when I actually removed the file from
the directory, fileinstall failed with the following NPE:
> Jun 7, 2009 11:23:52 PM  
> INFO: Failed to uninstall bundle: /tmp/autodeploy-bundles/test1.jar: java.lang.NullPointerException
> Jun 7, 2009 11:23:52 PM  
> INFO: java.lang.NullPointerException
> Jun 7, 2009 11:23:52 PM  
> INFO:   at org.apache.felix.fileinstall.DirectoryWatcher.uninstall(DirectoryWatcher.java:717)
> Jun 7, 2009 11:23:52 PM  
> INFO:   at org.apache.felix.fileinstall.DirectoryWatcher.uninstall(DirectoryWatcher.java:611)
> Jun 7, 2009 11:23:52 PM  
> INFO:   at org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWatcher.java:350)
> Jun 7, 2009 11:23:52 PM  
> INFO:   at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:122)
> I think it is OK to get the NPE, as user is expected to uninstall the bundle by removing
the file unlike what I did in this case. But I am not sure. So, I am filing this bug to share
my experience. The fix is pretty simple; we need to log the fact that the bundle has been
uninstalled by some other means and add a null check in the code. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message