db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1195301 - in /db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator: merge/ThreeWayMerger.java merge/package.html outlet/java/JavadocOutlet.java
Date Mon, 31 Oct 2011 01:57:23 GMT
Author: tfischer
Date: Mon Oct 31 01:57:23 2011
New Revision: 1195301

URL: http://svn.apache.org/viewvc?rev=1195301&view=rev
Log:
fix checkstyle errors:
- use constants for numbers, 
- add package.html
- remove trailing spaces

Added:
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/merge/package.html
Modified:
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/merge/ThreeWayMerger.java
    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/merge/ThreeWayMerger.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/merge/ThreeWayMerger.java?rev=1195301&r1=1195300&r2=1195301&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/merge/ThreeWayMerger.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/merge/ThreeWayMerger.java
Mon Oct 31 01:57:23 2011
@@ -32,21 +32,21 @@ import org.eclipse.jgit.merge.MergeResul
 
 /**
  * Can execute a three-way merge. This class is thread safe.
- * 
+ *
  * @version $Id: $
  */
 public class ThreeWayMerger
 {
     /**
      * Performs a three-way merge.
-     * 
+     *
      * @param base the base from which the other two versions are derived,
      *        not null.
      * @param generated the newly generated text, not null.
      * @param edited the possibly edited text, not null.
      * @param charsetName the name of the character set, not null.
      * @return the merge result, not null.
-     * 
+     *
      * @throws GeneratorException if merging fails.
      */
     public String merge(
@@ -62,8 +62,8 @@ public class ThreeWayMerger
         {
             mergeResult = mergeAlgorithm.merge(
                     RawTextComparator.DEFAULT,
-                    new RawText(base.getBytes(charsetName)), 
-                    new RawText(generated.getBytes(charsetName)), 
+                    new RawText(base.getBytes(charsetName)),
+                    new RawText(generated.getBytes(charsetName)),
                     new RawText(edited.getBytes(charsetName)));
         }
         catch (UnsupportedEncodingException e)
@@ -89,7 +89,7 @@ public class ThreeWayMerger
         }
         try
         {
-            String result 
+            String result
                 = new String(outputStream.toByteArray(), charsetName);
             return result;
         }

Added: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/merge/package.html
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/merge/package.html?rev=1195301&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/merge/package.html
(added)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/merge/package.html
Mon Oct 31 01:57:23 2011
@@ -0,0 +1,25 @@
+<!--
+ Copyright 2001-2006 The Apache Software Foundation.
+
+ Licensed under the Apache License, Version 2.0 (the "License")
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html>
+  <head>
+    <title>Torque generator merge helpers</title>
+  </head>
+  <body>
+    <p>
+      This package provides access to text file merge implementations.
+    </p>
+  </body>
+</html>

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=1195301&r1=1195300&r2=1195301&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
Mon Oct 31 01:57:23 2011
@@ -54,11 +54,14 @@ public class JavadocOutlet extends Outle
     /** The character which starts a javadoc attribute. */
     private static final String JAVADOC_ATTRIBUTE_START = "@";
 
+    /** The default maximum line width. */
+    private static final int DEFAULT_MAX_LINEWIDTH = 80;
+
     /** The line break string. */
     private String lineBreak = "\n";
 
     /** How long a line can be before it will be wrapped, -1 for no wrapping */
-    private int maxLineLength = 80;
+    private int maxLineLength = DEFAULT_MAX_LINEWIDTH;
 
     /** The indent to use in front of each line. */
     private String indent = "    ";



---------------------------------------------------------------------
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