[Schmitzm-commits] r2317 - trunk/schmitzm-core/src/main/java/de/schmitzm/io

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Mon May 27 17:23:58 CEST 2013


Author: mojays
Date: 2013-05-27 17:23:58 +0200 (Mon, 27 May 2013)
New Revision: 2317

Modified:
   trunk/schmitzm-core/src/main/java/de/schmitzm/io/ConsoleProgressBar.java
Log:
ConsoleProgressBar: BugFix effecting progress bar end (when maxValue < 100)

Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/io/ConsoleProgressBar.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/io/ConsoleProgressBar.java	2013-05-27 15:00:12 UTC (rev 2316)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/io/ConsoleProgressBar.java	2013-05-27 15:23:58 UTC (rev 2317)
@@ -65,8 +65,8 @@
 //    int perc = (int)Math.round(cellsProcessed*100.0/cellsTotal);
     int percRounded = (int)Math.round(perc);
     if ( percRounded != lastPerc ) {
-      for (int i=lastPerc; i<percRounded; i++)
-        System.out.print(percRounded < 100 ? ">" : "|");
+      for (int i=lastPerc+1; i<=percRounded; i++)
+        System.out.print(i < 100 ? ">" : "|");
       lastPerc = percRounded;
     }
   }



More information about the Schmitzm-commits mailing list