if (!success) resolver.getState().addResolverError(vc.getBundle(), errorType, vc.toString()); }
	public boolean checkPermission(VersionConstraint vc, BaseDescription bd) {		if (!checkPermissions)			return true;		boolean success = false;		Permission producerPermission = null, consumerPermission = null;		Bundle producer = null, consumer = null;		if (vc instanceof ImportPackageSpecification) {			producerPermission = new PackagePermission(bd.getName(), PackagePermission.EXPORT);			consumerPermission = new PackagePermission(vc.getName(), PackagePermission.IMPORT);			producer = context.getBundle(((ExportPackageDescription) bd).getExporter().getBundleId());		} else {			boolean requireBundle = vc instanceof BundleSpecification;			producerPermission = new BundlePermission(bd.getName(), requireBundle ? BundlePermission.PROVIDE : BundlePermission.HOST);			consumerPermission = new BundlePermission(vc.getName(), requireBundle ? BundlePermission.REQUIRE : BundlePermission.FRAGMENT);			producer = context.getBundle(((BundleDescription) bd).getBundleId());		}		consumer = context.getBundle(vc.getBundle().getBundleId());		if (producer != null && (producer.getState() & Bundle.UNINSTALLED) == 0)			success = producer.hasPermission(producerPermission);		if (success && consumer != null && (consumer.getState() & Bundle.UNINSTALLED) == 0)			success = consumer.hasPermission(consumerPermission);		return success;	}