@Override public void cleanup() { // If cleanup gets called before finalizePatch, something went wrong if (state != State.PREPARED) { undoChanges(); } }
@Override public void cleanup() { // If cleanup gets called before finalizePatch, something went wrong if (state != State.PREPARED) { undoChanges(); } }
@Override public void commit() { if (state == State.PREPARED) { complete(modification, callback); } else { undoChanges(); throw new IllegalStateException(); } }
@Override public void commit() { if (state == State.PREPARED) { complete(modification, callback); } else { undoChanges(); throw new IllegalStateException(); } }
/** * Cancel the current patch and undo the changes. * * @param callback the finalize callback */ protected void cancel(final FinalizeCallback callback) { try { undoChanges(); } finally { callback.operationCancelled(this); } }
/** * Cancel the current patch and undo the changes. * * @param callback the finalize callback */ protected void cancel(final FinalizeCallback callback) { try { undoChanges(); } finally { callback.operationCancelled(this); } }
@Override public void rollback() { if (undoChanges()) { try { callback.operationCancelled(IdentityPatchContext.this); } finally { modification.cancel(); } } } };
@Override public void rollback() { if (undoChanges()) { try { callback.operationCancelled(IdentityPatchContext.this); } finally { modification.cancel(); } } } };
} finally { try { undoChanges(); } finally { callback.operationCancelled(this);
} finally { try { undoChanges(); } finally { callback.operationCancelled(this);
final PatchContentLoader loader = PatchContentLoader.create(miscBackup, null, null); undoChanges(identityEntry, loader);
final PatchContentLoader loader = PatchContentLoader.create(miscBackup, null, null); undoChanges(identityEntry, loader);
callback.finishPatch(processedPatch, rollbackPatch, this); } catch (Exception e) { if (undoChanges()) { callback.operationCancelled(this);
callback.finishPatch(processedPatch, rollbackPatch, this); } catch (Exception e) { if (undoChanges()) { callback.operationCancelled(this);