Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338085 - NPE in BaseAdaptor.listEntryPaths
Summary: NPE in BaseAdaptor.listEntryPaths
Status: CLOSED WORKSFORME
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.7   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-24 08:57 EST by Glyn Normington CLA
Modified: 2011-02-24 11:53 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Glyn Normington CLA 2011-02-24 08:57:43 EST
This NPE looks set to happen as soon as bug 338081 is fixed. There is a possibility that this bug is due to the code changes made in Virgo in stepping up to Equinox build 3.7.0.v20110221 and so I am happy to take a built Equinox JAR fixing bug 338081 and re-test, but I thought I would raise this bug now as a heads up and because of the time difference between Southampton and the Equinox committers who will be working on these bugs.

We hit this problem in Equinox build 3.7.0.v20110221 which we need to fix bug 337538.

The calling sequence is that Virgo's integration test ApplicationContextDependencyMonitorIntegrationTests initialises the Virgo kernel. This attempts to issue a "kernel starting" message using logback and this needs to find a suitable NLS resource bundle.

The problem is that listEntryPaths is called with bundleFiles = [null] and so the following code sequence will NPE:

				for (BundleFile bundleFile : bundleFiles) {
					if (bundleFile.getEntry(path) != null && !pathList.contains(path))

The context is as follows:

The Virgo medic component calls BundleHost.findEntries, which is dispatched to AbstractBundle.findEntries, with parameters:

* path = ""
* filePattern =  "EventLogMessages_en_US.properties"
* recurse = false

This calls BaseAdaptor.findEntries with parameters:

* datas = [org.eclipse.virgo.kernel.core_3.0.0.BUILD-20110224114907]
* path = ""
* filePattern = "EventLogMessages_en_US.properties"
* options = 0

This calls BaseAdaptor.listEntryPaths with parameters:

* bundleFiles = [null] (which will be the subject of another bug)
* path = ""
* filePattern = "EventLogMessages_en_US.properties"
* options = 0