From 9f3fa47ab791ffb178b0ef3d3d3cdc1c8e0ea07b Mon Sep 17 00:00:00 2001 From: Nadya Zabrodina Date: Wed, 20 Jan 2016 19:17:52 +0300 Subject: [PATCH] [lvcs]: style: fix misprint; add annotation; remove parameter validation --- .../intellij/history/integration/LocalHistoryImpl.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/platform/lvcs-impl/src/com/intellij/history/integration/LocalHistoryImpl.java b/platform/lvcs-impl/src/com/intellij/history/integration/LocalHistoryImpl.java index d6509f542311..b1f21d89c76c 100644 --- a/platform/lvcs-impl/src/com/intellij/history/integration/LocalHistoryImpl.java +++ b/platform/lvcs-impl/src/com/intellij/history/integration/LocalHistoryImpl.java @@ -249,11 +249,7 @@ public class LocalHistoryImpl extends LocalHistory implements ApplicationCompone return myGateway; } - private void revertToLabel(@NotNull Project project, @NotNull VirtualFile f, LabelImpl impl) { - if (!f.exists() || !f.isValid()) { - notifyUser(project, String.format("File %s is not valid or doesn't exist", f.getName())); - return; - } + private void revertToLabel(@NotNull Project project, @NotNull VirtualFile f, @NotNull LabelImpl impl) { HistoryDialogModel dirHistoryModel = f.isDirectory() ? new DirectoryHistoryDialogModel(project, myGateway, myVcs, f) : new EntireFileHistoryDialogModel(project, myGateway, myVcs, f); @@ -264,7 +260,7 @@ public class LocalHistoryImpl extends LocalHistory implements ApplicationCompone f.getName())); return; } - if (leftRev == 0) return; // we shouldn't revert because not changes found to revert; + if (leftRev == 0) return; // we shouldn't revert because no changes found to revert; try { dirHistoryModel.selectRevisions(-1, leftRev - 1); //-1 because we should revert all changes up to previous one, but not label-related. dirHistoryModel.createReverter().revert();