static void checkUpgradeConditions ( final UpgradeCondition condition , final InstallationManager . MutablePatchingTarget target ) throws PatchingException { // See if the prerequisites are met for ( final String required : condition . getRequires ( ) ) { if ( ! target . isApplied ( required ) ) { throw PatchLogger . ROOT_LOGGER . requiresPatch ( required ) ; } } // Check for incompatibilities for ( final String incompatible : condition . getIncompatibleWith ( ) ) { if ( target . isApplied ( incompatible ) ) { throw PatchLogger . ROOT_LOGGER . incompatiblePatch ( incompatible ) ; } } }
Check whether the patch can be applied to a given target .