Browse Source
Recently Robin tried to increase the size of the buffer used by ObjectInserter to fix a bug in the InputStream that handles AutoCRLF. The purpose of this buffer is NOT to make a random InputStream work correctly by passing it a larger buffer during read(byte[],int,int). Clarify the Javadoc on the buffer() method to reduce the risk someone tries to abuse it again. While we are here, modify the method to load the field into a local variable before returning. This should cut down 1 field load during the common case of the buffer being already allocated. Change-Id: Ic6898530d10fcd7e59f90397117a4a0d97e1f031 Signed-off-by: Chris Aniszczyk <zx@twitter.com>stable-2.0
Shawn O. Pearce
13 years ago
committed by
Chris Aniszczyk
1 changed files with 28 additions and 4 deletions
Loading…
Reference in new issue