mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Spellchecker: (minor) buffered reader stream of lines instead of readLine() in cycle
This commit is contained in:
@@ -46,10 +46,7 @@ public class StreamLoader implements Loader {
|
||||
|
||||
static void doLoad(@NotNull InputStream stream, @NotNull Consumer<String> consumer) {
|
||||
try (BufferedReader br = new BufferedReader(new InputStreamReader(stream, StandardCharsets.UTF_8))) {
|
||||
String line;
|
||||
while ((line = br.readLine()) != null) {
|
||||
consumer.consume(line);
|
||||
}
|
||||
br.lines().forEach(consumer::consume);
|
||||
}
|
||||
catch (Exception e) {
|
||||
Logger.getInstance(StreamLoader.class).error(e);
|
||||
|
||||
Reference in New Issue
Block a user