You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@joshua.apache.org by mj...@apache.org on 2016/04/22 06:17:57 UTC

[11/13] incubator-joshua git commit: fix in flush location

fix in flush location


Project: http://git-wip-us.apache.org/repos/asf/incubator-joshua/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-joshua/commit/61cd4896
Tree: http://git-wip-us.apache.org/repos/asf/incubator-joshua/tree/61cd4896
Diff: http://git-wip-us.apache.org/repos/asf/incubator-joshua/diff/61cd4896

Branch: refs/heads/morph
Commit: 61cd4896d1b604312c234c37c356180df3c1c707
Parents: 4ec7ddb
Author: Matt Post <po...@cs.jhu.edu>
Authored: Fri Apr 22 00:12:26 2016 -0400
Committer: Matt Post <po...@cs.jhu.edu>
Committed: Fri Apr 22 00:12:26 2016 -0400

----------------------------------------------------------------------
 src/joshua/util/io/LineReader.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/61cd4896/src/joshua/util/io/LineReader.java
----------------------------------------------------------------------
diff --git a/src/joshua/util/io/LineReader.java b/src/joshua/util/io/LineReader.java
index a4f9fe0..b4ef38c 100644
--- a/src/joshua/util/io/LineReader.java
+++ b/src/joshua/util/io/LineReader.java
@@ -274,7 +274,7 @@ public class LineReader implements Reader<String> {
 //        System.err.println(String.format("OLD %d NEW %d", progress, newProgress));
         
         if (newProgress > progress) {
-          for (int i = progress + 1; i <= newProgress; i++)
+          for (int i = progress + 1; i <= newProgress; i++) {
             if (i == 97) {
               System.err.print("1");
             } else if (i == 98) {
@@ -285,13 +285,13 @@ public class LineReader implements Reader<String> {
               System.err.println("%");
             } else if (i % 10 == 0) {
               System.err.print(String.format("%d", i));
-              System.err.flush();
             } else if ((i - 1) % 10 == 0)
               ; // skip at 11 since 10, 20, etc take two digits
             else {
               System.err.print(".");
-              System.err.flush();
             }
+          }
+          System.err.flush();
           progress = newProgress;
         }
       }