ConditionalPermissionInfoImpl existing = (ConditionalPermissionInfoImpl) getConditionalPermissionInfo(condPermInfo.getName()); if (existing != null) existing.deleted = true; condPerms.add(condPermInfo);
condPermInfo = (ConditionalPermissionInfoImpl) getConditionalPermissionInfo(name); if (condPermInfo == null) { condPermInfo = new ConditionalPermissionInfoImpl(name, conds, perms); condPerms.add(condPermInfo); }
	public ConditionalPermissionInfo setConditionalPermissionInfo(String name, ConditionInfo conds[], PermissionInfo perms[]) {		SecurityManager sm = System.getSecurityManager();		if (sm != null)			sm.checkPermission(new AllPermission());		if (name == null)			name = "generated_" + Long.toString(System.currentTimeMillis()); //$NON-NLS-1$		ConditionalPermissionInfoImpl condPermInfo = new ConditionalPermissionInfoImpl(name, conds, perms);		synchronized (condPerms) {			ConditionalPermissionInfoImpl existing = (ConditionalPermissionInfoImpl) getConditionalPermissionInfo(condPermInfo.getName());			if (existing != null) // do not call existing.delete() to avoid multiple saves				existing.deleted = true;			condPerms.add(condPermInfo);			saveCondPermInfos();		}		AbstractBundle bundles[] = framework.getAllBundles();		for (int i = 0; i < bundles.length; i++) {			AbstractBundle bundle = bundles[i];			if (bundle.domain == null) {				continue;			}			BundleCombinedPermissions bcp = (BundleCombinedPermissions) bundle.domain.getPermissions();			/* TODO I don't think we need this check */			if (perms == null) {				continue;			}			bcp.checkConditionalPermissionInfo(condPermInfo);		}		return condPermInfo;	}