db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r996259 - /db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/java/JavadocOutlet.java
Date Sun, 12 Sep 2010 07:37:04 GMT
Author: tfischer
Date: Sun Sep 12 07:37:03 2010
New Revision: 996259

URL: http://svn.apache.org/viewvc?rev=996259&view=rev
Log:
fix a few checkstyle complaints

Modified:
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/java/JavadocOutlet.java

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/java/JavadocOutlet.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/java/JavadocOutlet.java?rev=996259&r1=996258&r2=996259&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/java/JavadocOutlet.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/java/JavadocOutlet.java
Sun Sep 12 07:37:03 2010
@@ -45,6 +45,9 @@ public class JavadocOutlet extends Outle
     /** The first line of the javadoc. */
     private static final String START_LINE = "/**";
 
+    /** The mid line start of the javadoc. */
+    private static final String MID_LINE_START = " * ";
+
     /** The last line of the javadoc. */
     private static final String END_LINE = " */";
 
@@ -133,8 +136,8 @@ public class JavadocOutlet extends Outle
                             + JAVADOC_ATTRIBUTE_START,
                         true);
         StringBuilder result = new StringBuilder();
-        result.append(indent).append(" * ");
-        int currentLineLength = indent.length() + 3;
+        result.append(indent).append(MID_LINE_START);
+        int currentLineLength = indent.length() + MID_LINE_START.length();
         boolean lineBreakPossible = false;
         // last char is space so it can be removed
         boolean lastCharRemovable = true;
@@ -177,9 +180,10 @@ public class JavadocOutlet extends Outle
                     token = tokenizer.nextToken();
                     // 5 because of " * @" + space after attribute
                     currentIndent = StringUtils.rightPad(
-                            indent + " * ",
+                            indent + MID_LINE_START,
                             indent.length() + 5 + token.length());
-                    if (result.length() > indent.length() + 3)
+                    if (result.length()
+                            > indent.length() + MID_LINE_START.length())
                     {
                         // we could already be indented by a line break
                         // in a previous param
@@ -205,7 +209,8 @@ public class JavadocOutlet extends Outle
                         result.append(" ");
                     }
                     //+ 3 because " * "
-                    currentLineLength = indent.length() + 3;
+                    currentLineLength 
+                            = indent.length() + MID_LINE_START.length();
                     lastJavadocAttribute = token;
                 }
                 result.append(JAVADOC_ATTRIBUTE_START);
@@ -272,8 +277,11 @@ public class JavadocOutlet extends Outle
                                 result.length(),
                                 "");
                     }
-                    result.append(lineBreak).append(currentIndent).append(token);
-                    currentLineLength = currentIndent.length() + token.length();
+                    result.append(lineBreak)
+                        .append(currentIndent)
+                        .append(token);
+                    currentLineLength
+                            = currentIndent.length() + token.length();
                 }
                 else
                 {



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message