else
// no domain specified. Better use a collection that has all permissions
// this is done just incase someone sets the security manager later
permissions = ALLPERMISSIONS;
Certificate[] certs = null;
SignedContent signedContent = null;
if (bundlefile instanceof BundleFileWrapperChain) {
BundleFileWrapperChain wrapper = (BundleFileWrapperChain) bundlefile;
while (wrapper != null && (!(wrapper.getWrapped() instanceof SignedContent)))
wrapper = wrapper.getNext();
signedContent = wrapper == null ? null : (SignedContent) wrapper.getWrapped();
}
if (CLASS_CERTIFICATE && signedContent != null && signedContent.isSigned()) {
SignerInfo[] signers = signedContent.getSignerInfos();
if (signers.length > 0)
certs = signers[0].getCertificateChain();
}
return new BundleProtectionDomain(permissions, new CodeSource(bundlefile.getBaseFile().toURL(), certs), null);
} catch (MalformedURLException e) {