mirror of https://github.com/sbt/sbt.git
Avoid temporary string in JSON reading
This commit is contained in:
parent
f16997d3a9
commit
65e2980e9d
|
|
@ -22,7 +22,7 @@ class PlainInput[J: IsoString](input: InputStream, converter: SupportConverter[J
|
|||
val buffer = new Array[Char](bufferSize)
|
||||
var read = 0
|
||||
while ({ read = reader.read(buffer, 0, bufferSize); read != -1 }) {
|
||||
builder.append(String.valueOf(buffer.take(read)))
|
||||
builder.appendAll(buffer, 0, read)
|
||||
}
|
||||
builder.toString()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue