diff options
Diffstat (limited to 'platform/vcs-log/impl/src/com/intellij/vcs/log/data/VcsLogJoiner.java')
-rw-r--r-- | platform/vcs-log/impl/src/com/intellij/vcs/log/data/VcsLogJoiner.java | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/data/VcsLogJoiner.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/data/VcsLogJoiner.java index 6ed592f10939..fc51742b5318 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/data/VcsLogJoiner.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/data/VcsLogJoiner.java @@ -30,9 +30,7 @@ import java.util.*; * @author Kirill Likhodedov */ public class VcsLogJoiner<CommitId, Commit extends GraphCommit<CommitId>> { - private final static int BOUND_SAVED_LOG = 10000; - public final static String NOT_ENOUGH_FIRST_BLOCK = "Not enough first block"; public final static String ILLEGAL_DATA_RELOAD_ALL = "All data is illegal - request reload all"; /** @@ -100,12 +98,10 @@ public class VcsLogJoiner<CommitId, Commit extends GraphCommit<CommitId>> { Commit commit = commits.get(lastIndex); if (searchHashes.size() == 0) return lastIndex; - if (lastIndex > BOUND_SAVED_LOG) - throw new IllegalStateException(ILLEGAL_DATA_RELOAD_ALL); searchHashes.remove(commit.getId()); } if (searchHashes.size() != 0) - throw new IllegalStateException(ILLEGAL_DATA_RELOAD_ALL); + throw new VcsLogRefreshNotEnoughDataException(); return lastIndex; } @@ -157,16 +153,13 @@ public class VcsLogJoiner<CommitId, Commit extends GraphCommit<CommitId>> { private void markRealRedNode(@NotNull CommitId node) { if (!currentRed.remove(node)) - throw new IllegalStateException(NOT_ENOUGH_FIRST_BLOCK); + throw new IllegalStateException(ILLEGAL_DATA_RELOAD_ALL); // never happened allRedCommit.add(node); } private int getFirstSaveIndex() { for (int lastIndex = 0; lastIndex < savedLog.size(); lastIndex++) { Commit commit = savedLog.get(lastIndex); - if (lastIndex > BOUND_SAVED_LOG) - throw new IllegalStateException(ILLEGAL_DATA_RELOAD_ALL); - boolean isGreen = currentGreen.contains(commit.getId()); if (isGreen) { currentRed.remove(commit.getId()); @@ -180,7 +173,7 @@ public class VcsLogJoiner<CommitId, Commit extends GraphCommit<CommitId>> { if (currentRed.isEmpty()) return lastIndex + 1; } - throw new IllegalStateException(ILLEGAL_DATA_RELOAD_ALL); + throw new IllegalStateException(ILLEGAL_DATA_RELOAD_ALL); // see VcsLogJoinerTest#illegalStateExceptionTest } public Set<CommitId> getAllRedCommit() { |