in cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/loader/BundleClassLoader.java [193:222]
private void definePackageFor(final Package model, final ProtectionDomain protectionDomain) {
if (model == null) {
return;
}
if (getPackage(model.getName()) == null) {
if (model.isSealed() && protectionDomain != null &&
protectionDomain.getCodeSource() != null &&
protectionDomain.getCodeSource().getLocation() != null) {
definePackage(
model.getName(),
model.getSpecificationTitle(),
model.getSpecificationVersion(),
model.getSpecificationVendor(),
model.getImplementationTitle(),
model.getImplementationVersion(),
model.getImplementationVendor(),
protectionDomain.getCodeSource().getLocation());
} else {
definePackage(
model.getName(),
model.getSpecificationTitle(),
model.getSpecificationVersion(),
model.getSpecificationVendor(),
model.getImplementationTitle(),
model.getImplementationVersion(),
model.getImplementationVendor(),
null);
}
}
}