mirror of https://github.com/apache/lucene.git
Merged revision(s) 1305837 from lucene/dev/branches/branch_3x:
Fix possible overflow in RAMOutputStream.sizeInBytes() git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1305838 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a79cbb5746
commit
a2b98d9a51
|
@ -177,7 +177,7 @@ public class RAMOutputStream extends IndexOutput {
|
||||||
|
|
||||||
/** Returns byte usage of all buffers. */
|
/** Returns byte usage of all buffers. */
|
||||||
public long sizeInBytes() {
|
public long sizeInBytes() {
|
||||||
return file.numBuffers() * BUFFER_SIZE;
|
return (long) file.numBuffers() * (long) BUFFER_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue