URL u = bundle.getEntry("META-INF/permissions.perm"); if (u != null) { try { DataInputStream dis = new DataInputStream(u.openStream()); String line; Vector piList = new Vector(); while((line = dis.readLine()) != null) { line = line.trim(); if (line.startsWith("#") || line.startsWith(" try { PermissionInfo pi = new PermissionInfo(line); piList.add(pi); } catch(Exception e) {   framework.publishFrameworkEvent(FrameworkEvent.ERROR, bundle, e); } } ConditionalPermissionInfoImpl cpiArray[] = new ConditionalPermissionInfoImpl[1]; cpiArray[0] = new ConditionalPermissionInfoImpl(new ConditionInfo[0], (PermissionInfo[]) piList.toArray(new PermissionInfo[0])); ConditionalPermissionSet cps = new ConditionalPermissionSet(cpiArray, new Condition[0]); combined.setRestrictedPermissions(cps); } catch (IOException e) {   framework.publishFrameworkEvent(FrameworkEvent.ERROR, bundle, e); } }
	protected BundleProtectionDomain createProtectionDomain(AbstractBundle bundle) {		BundlePermissionCollection implied = getImpliedPermissions(bundle);		BundleCombinedPermissions combined = new BundleCombinedPermissions(implied);		BundlePermissionCollection assigned = getAssignedPermissions(bundle);		combined.setAssignedPermissions(assigned, assigned == defaultAssignedPermissions);		combined.setConditionalPermissions(new ConditionalPermissions(bundle, framework.condPermAdmin));		return new BundleProtectionDomainImpl(bundle, combined);	}