Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 338085

Summary: NPE in BaseAdaptor.listEntryPaths
Product: [Eclipse Project] Equinox Reporter: Glyn Normington <glyn.normington>
Component: FrameworkAssignee: equinox.framework-inbox <equinox.framework-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: blocker    
Priority: P3    
Version: 3.7   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

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