Skip to content

Commit

Permalink
lib: Avoid double buffering
Browse files Browse the repository at this point in the history
Signed-off-by: BJ Hargrave <bj@hargrave.dev>
  • Loading branch information
bjhargrave committed Jun 27, 2022
1 parent 278a431 commit 6f76ee8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aQute.libg/src/aQute/lib/collections/LineCollection.java
Expand Up @@ -27,7 +27,7 @@ public LineCollection(File in) throws IOException {
}

public LineCollection(Reader reader) throws IOException {
this(new BufferedReader(reader));
this((reader instanceof BufferedReader) ? (BufferedReader) reader : new BufferedReader(reader));
}

public LineCollection(BufferedReader reader) throws IOException {
Expand Down

0 comments on commit 6f76ee8

Please sign in to comment.