vcs: do not treat non-existent files as empty ones
authorAleksey Pivovarov <AMPivovarov@gmail.com>
Tue, 4 Aug 2015 12:32:59 +0000 (15:32 +0300)
committerAleksey Pivovarov <AMPivovarov@gmail.com>
Tue, 4 Aug 2015 13:41:00 +0000 (16:41 +0300)
platform/lvcs-impl/src/com/intellij/history/integration/ui/models/FileDifferenceModel.java

index 6879913f63100596da2f34219611fd61b06ab9ff..7dcecc1ee95e7055f72588d393fe6c2dec0ce817 100644 (file)
@@ -71,13 +71,13 @@ public abstract class FileDifferenceModel {
   protected abstract Entry getRightEntry();
 
   public DiffContent getLeftDiffContent(RevisionProcessingProgress p) {
-    if (!hasLeftEntry()) return DiffContentFactory.getInstance().create("");
+    if (!hasLeftEntry()) return DiffContentFactory.getInstance().createEmpty();
     if (!isLeftContentAvailable(p)) return DiffContentFactory.getInstance().create("Content not available");
     return doGetLeftDiffContent(p);
   }
 
   public DiffContent getRightDiffContent(RevisionProcessingProgress p) {
-    if (!hasRightEntry()) return DiffContentFactory.getInstance().create("");
+    if (!hasRightEntry()) return DiffContentFactory.getInstance().createEmpty();
     if (!isRightContentAvailable(p)) return DiffContentFactory.getInstance().create("Content not available");
     if (isRightContentCurrent) return getEditableRightDiffContent(p);
     return getReadOnlyRightDiffContent(p);