You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@opennlp.apache.org by GitBox <gi...@apache.org> on 2023/01/10 07:34:15 UTC

[GitHub] [opennlp] mawiesne commented on a diff in pull request #486: OPENNLP-1440 Ensure files are read via buffered IO operations

mawiesne commented on code in PR #486:
URL: https://github.com/apache/opennlp/pull/486#discussion_r1065418797


##########
opennlp-tools/src/main/java/opennlp/tools/cmdline/dictionary/DictionaryBuilderTool.java:
##########
@@ -56,8 +58,8 @@ public void run(String[] args) {
     CmdLineUtil.checkInputFile("dictionary input file", dictInFile);
     CmdLineUtil.checkOutputFile("dictionary output file", dictOutFile);
 
-    try (InputStreamReader in = new InputStreamReader(new FileInputStream(dictInFile), encoding);
-        OutputStream out = new FileOutputStream(dictOutFile)) {
+    try (Reader in = new BufferedReader(new InputStreamReader(new FileInputStream(dictInFile), encoding));
+         OutputStream out = new FileOutputStream(dictOutFile)) {

Review Comment:
   This PR/issues targets _read_ IO operations, only. _Write_ is a separate topic.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@opennlp.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org