Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.text/src/org/eclipse/text/edits/EditDocument.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/org.eclipse.text/src/org/eclipse/text/edits/EditDocument.java b/org.eclipse.text/src/org/eclipse/text/edits/EditDocument.java
index f0ebd2d58..7d8913da9 100644
--- a/org.eclipse.text/src/org/eclipse/text/edits/EditDocument.java
+++ b/org.eclipse.text/src/org/eclipse/text/edits/EditDocument.java
@@ -82,9 +82,7 @@ class EditDocument implements IDocument {
}
public String get(int offset, int length) throws BadLocationException {
- char[] result= new char[length];
- fBuffer.getChars(offset, offset + length, result, 0);
- return new String(result);
+ return fBuffer.substring(offset, offset + length);
}
public char getChar(int offset) throws BadLocationException {

Back to the top