Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java
index 95b3fa090b..6c421c5f50 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java
@@ -53,6 +53,7 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
+import org.eclipse.jgit.JGitText;
import org.eclipse.jgit.lib.NullProgressMonitor;
import org.eclipse.jgit.lib.ProgressMonitor;
@@ -196,7 +197,7 @@ public abstract class TemporaryBuffer extends OutputStream {
public byte[] toByteArray() throws IOException {
final long len = length();
if (Integer.MAX_VALUE < len)
- throw new OutOfMemoryError("Length exceeds maximum array size");
+ throw new OutOfMemoryError(JGitText.get().lengthExceedsMaximumArraySize);
final byte[] out = new byte[(int) len];
int outPtr = 0;
for (final Block b : blocks) {
@@ -351,7 +352,7 @@ public abstract class TemporaryBuffer extends OutputStream {
final long len = length();
if (Integer.MAX_VALUE < len)
- throw new OutOfMemoryError("Length exceeds maximum array size");
+ throw new OutOfMemoryError(JGitText.get().lengthExceedsMaximumArraySize);
final byte[] out = new byte[(int) len];
final FileInputStream in = new FileInputStream(onDiskFile);
try {
@@ -419,7 +420,7 @@ public abstract class TemporaryBuffer extends OutputStream {
@Override
protected OutputStream overflow() throws IOException {
- throw new IOException("In-memory buffer limit exceeded");
+ throw new IOException(JGitText.get().inMemoryBufferLimitExceeded);
}
}

Back to the top