Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

Commit

Permalink
Merge pull request #186 from retronym/topic/avoid-temp-string
Browse files Browse the repository at this point in the history
Avoid temporary string, array in JSON reading
  • Loading branch information
eed3si9n authored Oct 9, 2018
2 parents 7c54c36 + aaf8427 commit a57eb63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util-cache/src/main/scala/sbt/util/Input.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit a57eb63

Please sign in to comment.