[ http://issues.apache.org/jira/browse/FELIX-143?page=all ]

Richard S. Hall resolved FELIX-143.
-----------------------------------

    Resolution: Fixed

The findEntries() code was assuming that all bundles have content, but the 
system bundle does not, which was the cause of the exception. I added a check 
for null content.

> Calling org.osgi.framework.Bundle.findEntries(path, pattern, recurse) on the 
> system bundle throws NPE
> -----------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-143
>                 URL: http://issues.apache.org/jira/browse/FELIX-143
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 0.8.0
>            Reporter: Manuel Santillán
>         Assigned To: Richard S. Hall
>             Fix For: 0.8.0
>
>         Attachments: bug-test.zip
>
>
> When calling findEntries on the system bundle: 
>               Bundle system=context.getBundle(0);
>               system.findEntries("path", "*", false);
> A NPE exception is raised: 
> java.lang.NullPointerException
>       at 
> org.apache.felix.framework.FindEntriesEnumeration.<init>(FindEntriesEnumeration.java:37)
>       at org.apache.felix.framework.Felix.findBundleEntries(Felix.java:1033)
>       at 
> org.apache.felix.framework.BundleImpl.findEntries(BundleImpl.java:122)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to