Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/DiffEditorPage.java')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/DiffEditorPage.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/DiffEditorPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/DiffEditorPage.java
index a44143a29f..916bb61b69 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/DiffEditorPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/DiffEditorPage.java
@@ -470,7 +470,7 @@ public class DiffEditorPage extends TextEditor
viewer.getProjectionAnnotationModel().modifyAnnotations(
currentFoldingAnnotations, newAnnotations, null);
currentFoldingAnnotations = newAnnotations.keySet()
- .toArray(new Annotation[newAnnotations.size()]);
+ .toArray(new Annotation[0]);
} else {
viewer.disableProjection();
currentFoldingAnnotations = null;
@@ -519,7 +519,7 @@ public class DiffEditorPage extends TextEditor
}
}
currentOverviewAnnotations = newAnnotations.keySet()
- .toArray(new Annotation[newAnnotations.size()]);
+ .toArray(new Annotation[0]);
}
private FileDiffRegion getFileDiffRange(int widgetOffset) {
@@ -554,7 +554,7 @@ public class DiffEditorPage extends TextEditor
.addAll(asList(new RepositoryCommit(commit.getRepository(),
untrackedCommit).getDiffs()));
}
- FileDiff[] result = diffResult.toArray(new FileDiff[diffResult.size()]);
+ FileDiff[] result = diffResult.toArray(new FileDiff[0]);
Arrays.sort(result, FileDiff.PATH_COMPARATOR);
return result;
}

Back to the top