/** * Rollback the last applied patch. * * @param contentPolicy the content policy * @param resetConfiguration whether to reset the configuration * @param modification the installation modification * @return the patching result * @throws PatchingException */ public PatchingResult rollbackLast(final ContentVerificationPolicy contentPolicy, final boolean resetConfiguration, InstallationManager.InstallationModification modification) throws PatchingException { // Determine the patch id to rollback String patchId; final List<String> oneOffs = modification.getPatchIDs(); if (oneOffs.isEmpty()) { patchId = modification.getCumulativePatchID(); if (patchId == null || Constants.NOT_PATCHED.equals(patchId)) { throw PatchLogger.ROOT_LOGGER.noPatchesApplied(); } } else { patchId = oneOffs.get(0);//oneOffs.get(oneOffs.size() - 1); } return rollbackPatch(patchId, contentPolicy, false, resetConfiguration, modification); }
/** * Rollback the last applied patch. * * @param contentPolicy the content policy * @param resetConfiguration whether to reset the configuration * @param modification the installation modification * @return the patching result * @throws PatchingException */ public PatchingResult rollbackLast(final ContentVerificationPolicy contentPolicy, final boolean resetConfiguration, InstallationManager.InstallationModification modification) throws PatchingException { // Determine the patch id to rollback String patchId; final List<String> oneOffs = modification.getPatchIDs(); if (oneOffs.isEmpty()) { patchId = modification.getCumulativePatchID(); if (patchId == null || Constants.NOT_PATCHED.equals(patchId)) { throw PatchLogger.ROOT_LOGGER.noPatchesApplied(); } } else { patchId = oneOffs.get(0);//oneOffs.get(oneOffs.size() - 1); } return rollbackPatch(patchId, contentPolicy, false, resetConfiguration, modification); }
final List<String> oneOffs = modification.getPatchIDs(); final int index = oneOffs.indexOf(patchId);
if (patchType == Patch.PatchType.CUMULATIVE) { final List<String> invalidation = new ArrayList<String>(modification.getPatchIDs()); if (!invalidation.isEmpty()) { try {
final List<String> oneOffs = modification.getPatchIDs(); final int index = oneOffs.indexOf(patchId);
if (patchType == Patch.PatchType.CUMULATIVE) { final List<String> invalidation = new ArrayList<String>(modification.getPatchIDs()); if (!invalidation.isEmpty()) { try {