return new ClasspathDomain(bundlefile.getBaseFile().toURL(), permissions);
Certificate[] certs = null; if (bundlefile instanceof CertificateVerifier) { CertificateChain[] chains = ((CertificateVerifier) bundlefile).getChains(); certs = chains == null || chains.length == 0 ? null : chains[0].getCertificates(); } return new ProtectionDomain(new CodeSource(bundlefile.getBaseFile().toURL(), certs), permissions);
	public static ProtectionDomain createProtectionDomain(BundleFile bundlefile, ProtectionDomain baseDomain) {		// create a protection domain which knows about the codesource for this classpath entry (bug 89904)		try {			// use the permissions supplied by the domain passed in from the framework			PermissionCollection permissions;			if (baseDomain != null)				permissions = baseDomain.getPermissions();			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;			return new ClasspathDomain(bundlefile.getBaseFile().toURL(), permissions);		} catch (MalformedURLException e) {			// Failed to create our own domain; just return the baseDomain			return baseDomain;		}	}