If you use the method org.osgi.framework#Bundle.getEntryPaths
then read on ...
The OSGi R4.1 release (which is being
implemented in Europa) has made a clarification on the behavior of Bundle.getEntryPaths.
The javadoc for the method org.osgi.framework.Bundle#getEntryPaths
did not make it clear whether the String paths returned had leading '/'
character or not. The following clarification has been made ...
The returned paths are all relative
to the root of this bundle and must not begin with "/".
Unfortunately Equinox had a bug for
directory (exploded) bundles where a leading '/' character was included
in the results if the client used a path argument that contained a leading
'/'. For jar'ed bundles Equinox would always ensure the returned
paths did not have a leading '/' character. This was inconsistent
behavior. Directory bundles have now been fixed to be consistent
with jar'ed bundles. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=174101
for more information.
Some clients may have a dependency on
the old behavior for directory bundles. If you use the method Bundle#getEntryPaths
then please ensure that you can handle return paths that do not begin with
a '/' character. In reality this is a bug in the client code because
it would have failed for jar'ed bundles