commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r748453 - /commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/HelpFormatter.java
Date Fri, 27 Feb 2009 09:18:40 GMT
Author: bayard
Date: Fri Feb 27 09:18:38 2009
New Revision: 748453

URL: http://svn.apache.org/viewvc?rev=748453&view=rev
Log:
Improving the order of the code - no point using a variable before it is tested

Modified:
    commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/HelpFormatter.java

Modified: commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/HelpFormatter.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/HelpFormatter.java?rev=748453&r1=748452&r2=748453&view=diff
==============================================================================
--- commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/HelpFormatter.java
(original)
+++ commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/HelpFormatter.java
Fri Feb 27 09:18:38 2009
@@ -819,10 +819,6 @@
         }
         sb.append(rtrim(text.substring(0, pos))).append(defaultNewLine);
 
-        // all following lines must be padded with nextLineTabStop space 
-        // characters
-        final String padding = createPadding(nextLineTabStop);
-
         if (nextLineTabStop >= width)
         {
             // stops infinite loop happening
@@ -830,6 +826,10 @@
                                             "- no room for the description");
         }
 
+        // all following lines must be padded with nextLineTabStop space 
+        // characters
+        final String padding = createPadding(nextLineTabStop);
+
         while (true)
         {
             text = padding + text.substring(pos).trim();



Mime
View raw message