in src/main/java/org/apache/sling/maven/jspc/classloader/PackageAdminClassLoader.java [84:105]
private boolean isBundleActive( final Bundle bundle ) {
if ( bundle != null ) {
if ( bundle.getState() == Bundle.ACTIVE ) {
return true;
}
if ( bundle.getState() == Bundle.STARTING ) {
// according to the spec the activationPolicy header is only
// set to request a bundle to be lazily activated. So in this
// simple check we just verify the header is set to assume
// the bundle is considered a lazily activated bundle
return bundle.getHeaders().get( Constants.BUNDLE_ACTIVATIONPOLICY ) != null;
}
if (bundle.getState() == Bundle.RESOLVED) {
return true;
}
}
// fall back: bundle is not considered active
return false;
}