-
Notifications
You must be signed in to change notification settings - Fork 189
Closed
Milestone
Description
When the Bundle-ClassPath contains "." the java classes are not correctly scanned to search for jakarta annotations. The problem is with:
https://github.com/ops4j/org.ops4j.pax.web/blob/pax-web-11.0.x/pax-web-api/src/main/java/org/ops4j/pax/web/utils/ClassPathUtil.java#L165
final String bundleClasspath = bundle.getHeaders() == null ? null
: bundle.getHeaders().get(Constants.BUNDLE_CLASSPATH);
if (bundleClasspath == null) {
// fallback to just root directory of the bundle
return new URL[] { bundle.getEntry("/") };
} else {
String[] segments = bundleClasspath.split("\\s*,\\s*");
for (String segment : segments) {
final URL url = bundle.getEntry(segment);
if (url == null) {
continue;
}When the segment is equal "." the bundle.getEntry(".") returns null. It has to be "/" instead probably. I believe that there should be a check. If segment == "." then use "/" instead.