commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject 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
Date Tue, 12 Apr 2011 19:17:14 GMT
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);
             }
         }



Mime
View raw message