karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1420656 - /karaf/trunk/main/src/main/java/org/apache/karaf/main/StartupListener.java
Date Wed, 12 Dec 2012 13:20:49 GMT
Author: ffang
Date: Wed Dec 12 13:20:48 2012
New Revision: 1420656

URL: http://svn.apache.org/viewvc?rev=1420656&view=rev
Log:
[KARAF-2052]also fix this issue on windows

Modified:
    karaf/trunk/main/src/main/java/org/apache/karaf/main/StartupListener.java

Modified: karaf/trunk/main/src/main/java/org/apache/karaf/main/StartupListener.java
URL: http://svn.apache.org/viewvc/karaf/trunk/main/src/main/java/org/apache/karaf/main/StartupListener.java?rev=1420656&r1=1420655&r2=1420656&view=diff
==============================================================================
--- karaf/trunk/main/src/main/java/org/apache/karaf/main/StartupListener.java (original)
+++ karaf/trunk/main/src/main/java/org/apache/karaf/main/StartupListener.java Wed Dec 12 13:20:48
2012
@@ -87,14 +87,14 @@ class StartupListener implements Framewo
 
     public void showProgressBar(int done, int total) {
         int percent = (done * 100) / total;
-        // progress bar can only have 73 characters so that 80 char wide terminal will display
properly
-        int scaledPercent = (int) (73.0 * (percent / 100.0));
+        // progress bar can only have 72 characters so that 80 char wide terminal will display
properly
+        int scaledPercent = (int) (72.0 * (percent / 100.0));
         // Make sure we do not go backwards with percentage
         if (percent > currentPercentage) {
             currentPercentage = percent;
             StringBuilder sb = new StringBuilder();
             sb.append(String.format("\r%3d%% [", percent));
-            for (int i = 0; i < 73; i++) {
+            for (int i = 0; i < 72; i++) {
                 if (i < scaledPercent) {
                     sb.append('=');
                 } else if (i == scaledPercent) {



Mime
View raw message