Now that any large objects are forced through a streaming loader
when its bigger than getStreamFileThreshold(), and that threshold
is pegged at Integer.MAX_VALUE as its largest size, we will never
be able to reach this code path where we threw OutOfMemoryError.
Robin pointed out that we probably should include a message here,
but the code is effectively unreachable, so there isn't any value
in adding a message at this point.
So remove it.
Change-Id: Ie611d005622e38a75537f1350246df0ab89dd500
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
private final byte[] decompress(final long position, final long totalSize,
final WindowCursor curs) throws IOException, DataFormatException {
- if (totalSize > Integer.MAX_VALUE)
- throw new OutOfMemoryError();
final byte[] dstbuf = new byte[(int) totalSize];
if (curs.inflate(this, position, dstbuf, 0) != totalSize)
throw new EOFException(MessageFormat.format(JGitText.get().shortCompressedStreamAt, position));