You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by eb...@apache.org on 2011/04/12 21:17:14 UTC

svn commit: r1091550 - in /commons/proper/cli/trunk/src: conf/checkstyle.xml main/java/org/apache/commons/cli/CommandLine.java main/java/org/apache/commons/cli/HelpFormatter.java main/java/org/apache/commons/cli/Options.java

Author: ebourg
Date: Tue Apr 12 19:17:14 2011
New Revision: 1091550

URL: http://svn.apache.org/viewvc?rev=1091550&view=rev
Log:
Checkstyles fixes

Modified:
    commons/proper/cli/trunk/src/conf/checkstyle.xml
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/CommandLine.java
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/HelpFormatter.java
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java

Modified: commons/proper/cli/trunk/src/conf/checkstyle.xml
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/conf/checkstyle.xml?rev=1091550&r1=1091549&r2=1091550&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/conf/checkstyle.xml (original)
+++ commons/proper/cli/trunk/src/conf/checkstyle.xml Tue Apr 12 19:17:14 2011
@@ -55,9 +55,7 @@ limitations under the License.
             <property name="allowUndeclaredRTE" value="true"/>
             <property name="allowMissingJavadoc" value="true"/>
         </module>
-        <module name="JavadocType">
-            <property name="authorFormat" value="\S"/>
-        </module>
+        <module name="JavadocType"/>
         <module name="JavadocVariable"/>
 
 

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/CommandLine.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/CommandLine.java?rev=1091550&r1=1091549&r2=1091550&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/CommandLine.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/CommandLine.java Tue Apr 12 19:17:14 2011
@@ -191,7 +191,8 @@ public class CommandLine implements Seri
     private Option resolveOption(String opt)
     {
         opt = Util.stripLeadingHyphens(opt);
-        for (Option option : options) {
+        for (Option option : options)
+        {
             if (opt.equals(option.getOpt()))
             {
                 return option;

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/HelpFormatter.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/HelpFormatter.java?rev=1091550&r1=1091549&r2=1091550&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/HelpFormatter.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/HelpFormatter.java Tue Apr 12 19:17:14 2011
@@ -896,20 +896,28 @@ public class HelpFormatter
      * @param nextLineTabStop The position on the next line for the first tab.
      * @param text The text to be rendered.
      */
-    private StringBuffer renderWrappedTextBlock(StringBuffer sb, int width, int nextLineTabStop, String text) {
-        try {
+    private StringBuffer renderWrappedTextBlock(StringBuffer sb, int width, int nextLineTabStop, String text)
+    {
+        try
+        {
             BufferedReader in = new BufferedReader(new StringReader(text));
             String line;
             boolean firstLine = true;
-            while ((line = in.readLine()) != null) {
-                if (!firstLine) {
+            while ((line = in.readLine()) != null)
+            {
+                if (!firstLine)
+                {
                     sb.append(getNewLine());
-                } else {
+                }
+                else
+                {
                     firstLine = false;
                 }
                 renderWrappedText(sb, width, nextLineTabStop, line);
             }
-        } catch (IOException e) {
+        }
+        catch (IOException e)
+        {
             // cannot happen
         }
 

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java?rev=1091550&r1=1091549&r2=1091550&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java Tue Apr 12 19:17:14 2011
@@ -227,8 +227,10 @@ public class Options implements Serializ
         
         List<String> matchingOpts = new ArrayList<String>();
         
-        for (String longOpt : longOpts.keySet()) {
-            if (longOpt.startsWith(opt)) {
+        for (String longOpt : longOpts.keySet())
+        {
+            if (longOpt.startsWith(opt))
+            {
                 matchingOpts.add(longOpt);
             }
         }