Browse Source

LfsFactory#LfsInputStream: Override int read(byte[], int, int)

According to Error Prone, the class should also override:

  int read(byte[], int, int)

otherwise multi-byte reads from this input stream are likely to be slow.

See https://errorprone.info/bugpattern/InputStreamSlowMultibyteRead

Change-Id: I33ab8cd30013447f2a0363b3a7b1424b79cb1818
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-5.2
David Pursehouse 6 years ago
parent
commit
731d638f69
  1. 5
      org.eclipse.jgit/src/org/eclipse/jgit/util/LfsFactory.java

5
org.eclipse.jgit/src/org/eclipse/jgit/util/LfsFactory.java

@ -294,6 +294,11 @@ public class LfsFactory {
return stream.read(); return stream.read();
} }
@Override
public int read(byte b[], int off, int len) throws IOException {
return stream.read(b, off, len);
}
/** /**
* @return the length of the stream * @return the length of the stream
*/ */

Loading…
Cancel
Save