db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r993517 - in /db/torque/torque4/trunk/torque-generator/src: main/java/org/apache/torque/generator/file/ main/java/org/apache/torque/generator/jdbc/ main/java/org/apache/torque/generator/outlet/java/ main/java/org/apache/torque/generator/sou...
Date Tue, 07 Sep 2010 20:19:38 GMT
Author: tfischer
Date: Tue Sep  7 20:19:37 2010
New Revision: 993517

URL: http://svn.apache.org/viewvc?rev=993517&view=rev
Log:
Code style (remove tabs, adjust newlines and spaces, add javadoc)

Modified:
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/Fileset.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/jdbc/SchemaType.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/java/JavadocOutlet.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/ColumnMetadata.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/ForeignKeyMetadata.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSource.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSourceProvider.java
    db/torque/torque4/trunk/torque-generator/src/test/file/1.properties
    db/torque/torque4/trunk/torque-generator/src/test/file/11.properties
    db/torque/torque4/trunk/torque-generator/src/test/file/subfolder/2.properties
    db/torque/torque4/trunk/torque-generator/src/test/file/subfolder/subsubfolder/3.properties
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ReadConfigurationTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/DeeplyNestedMergepointsTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/java/JavaOutlet.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/java/NewlineOutletTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/SourcePathTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/template/velocity/VelocityTemplateFilterTest.java
    db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/variable/VariableTest.java

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/Fileset.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/Fileset.java?rev=993517&r1=993516&r2=993517&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/Fileset.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/Fileset.java
Tue Sep  7 20:19:37 2010
@@ -45,13 +45,13 @@ public class Fileset
     /** The class logger. */
     private static Log log = LogFactory.getLog(Fileset.class);
 
-	/** The base directory of the fileset. */
-	private File basedir;
+    /** The base directory of the fileset. */
+    private File basedir;
 
-	/**
-	 * The patterns for the files to include.
-	 * If null or empty, all Files are included.
-	 */
+    /**
+     * The patterns for the files to include.
+     * If null or empty, all Files are included.
+     */
     private Set<String> includes;
 
     /**
@@ -72,15 +72,15 @@ public class Fileset
      *
      * @param the basedir, or null to use the current basedir.
      * @param includes The patterns for the files to include.
-	 *        If null or empty, all Files are included.
+     *        If null or empty, all Files are included.
      * @param excludes The patterns for the files to exclude.
      *        If null or empty, no Files are excluded.
      */
     public Fileset(File basedir, Set<String> includes, Set<String> excludes)
     {
-    	this.basedir = basedir;
-    	this.includes = includes;
-    	this.excludes = excludes;
+        this.basedir = basedir;
+        this.includes = includes;
+        this.excludes = excludes;
     }
 
     /**
@@ -88,10 +88,10 @@ public class Fileset
      *
      * @return the base directory, or null if no basedir is specified.
      */
-	public File getBasedir()
-	{
-		return basedir;
-	}
+    public File getBasedir()
+    {
+        return basedir;
+    }
 
     /**
      * Sets the base directory of the fileset.
@@ -181,15 +181,15 @@ public class Fileset
             String[] wildcardParts = StringUtils.split(wildcardPattern, "\\/");
             List<String> wildcardPartList = Arrays.asList(wildcardParts);
 
-            List<File> includes = getFiles(
+            List<File> includeFiles = getFiles(
                     wildcardFreeBaseDir,
                     wildcardPartList);
-            result.addAll(includes);
+            result.addAll(includeFiles);
         }
         // process excludes
         if (excludes == null)
         {
-        	return result;
+            return result;
         }
         Iterator<File> fileIt = result.iterator();
         while (fileIt.hasNext())
@@ -207,7 +207,7 @@ public class Fileset
             }
             if (excluded)
             {
-            	fileIt.remove();
+                fileIt.remove();
             }
         }
         return result;
@@ -284,40 +284,40 @@ public class Fileset
                     + ", current path parts: "
                     + pathPartList);
         }
-		List<String> partsCopy = new ArrayList<String>(pathPartList);
-		String includeToProcess = partsCopy.remove(0);
-		if (partsCopy.size() == 0)
-		{
-		    File[] matches = currentBaseDir.listFiles(
-		            new WildcardFilter(includeToProcess, false, true));
-		    if (matches == null)
-		    {
-		        throw new IOException(
-		                "Could not list files in the following Directory "
-		                    + "while reading the sources: "
-		                    + currentBaseDir.getAbsolutePath());
-		    }
-		    List<File> result = Arrays.asList(matches);
-		    if (log.isTraceEnabled())
-	        {
-	            log.trace("getFiles(File, List) : Returning files "
-	                    + result);
-	        }
-		    return result;
-		}
-		if ("..".equals(includeToProcess))
-		{
-		    return getFiles(currentBaseDir.getParentFile(), partsCopy);
-		}
-		File[] matchingDirs = currentBaseDir.listFiles(
-		        new WildcardFilter(includeToProcess, true, false));
-		List<File> result = new ArrayList<File>();
-		for (File dir : matchingDirs)
-		{
-		    result.addAll(getFiles(dir, partsCopy));
-		}
-		return result;
-	}
+        List<String> partsCopy = new ArrayList<String>(pathPartList);
+        String includeToProcess = partsCopy.remove(0);
+        if (partsCopy.size() == 0)
+        {
+            File[] matches = currentBaseDir.listFiles(
+                    new WildcardFilter(includeToProcess, false, true));
+            if (matches == null)
+            {
+                throw new IOException(
+                        "Could not list files in the following Directory "
+                            + "while reading the sources: "
+                            + currentBaseDir.getAbsolutePath());
+            }
+            List<File> result = Arrays.asList(matches);
+            if (log.isTraceEnabled())
+            {
+                log.trace("getFiles(File, List) : Returning files "
+                        + result);
+            }
+            return result;
+        }
+        if ("..".equals(includeToProcess))
+        {
+            return getFiles(currentBaseDir.getParentFile(), partsCopy);
+        }
+        File[] matchingDirs = currentBaseDir.listFiles(
+                new WildcardFilter(includeToProcess, true, false));
+        List<File> result = new ArrayList<File>();
+        for (File dir : matchingDirs)
+        {
+            result.addAll(getFiles(dir, partsCopy));
+        }
+        return result;
+    }
 
     /**
      * Returns the position of the separator which separates the base part
@@ -423,26 +423,26 @@ public class Fileset
 
     static boolean matchesPattern(File file, String pattern)
     {
-    	String filePath = file.getPath();
-    	List<String> fileParts = splitAndNormalize(filePath);
-    	List<String> patternParts = splitAndNormalize(pattern);
-    	if (fileParts.size() != patternParts.size())
-		{
-    		return false;
-		}
-    	Iterator<String> patternPartIt = patternParts.iterator();
-    	for (String filePart : fileParts)
-    	{
-    		String patternPart = patternPartIt.next();
-    		if (!FilenameUtils.wildcardMatch(
-    				filePart,
-    				patternPart,
+        String filePath = file.getPath();
+        List<String> fileParts = splitAndNormalize(filePath);
+        List<String> patternParts = splitAndNormalize(pattern);
+        if (fileParts.size() != patternParts.size())
+        {
+            return false;
+        }
+        Iterator<String> patternPartIt = patternParts.iterator();
+        for (String filePart : fileParts)
+        {
+            String patternPart = patternPartIt.next();
+            if (!FilenameUtils.wildcardMatch(
+                    filePart,
+                    patternPart,
                     IOCase.SENSITIVE))
-    		{
-    			return false;
-    		}
-    	}
-    	return true;
+            {
+                return false;
+            }
+        }
+        return true;
     }
 
     /**
@@ -455,25 +455,25 @@ public class Fileset
      */
     static List<String> splitAndNormalize(String path)
     {
-    	String[] parts = StringUtils.split(path, "\\/");
-    	List<String> normalizedParts = new ArrayList<String>();
-    	for (String part : parts)
-    	{
-    		if (".".equals(part))
-    		{
-    			continue;
-    		}
-    		if ("..".equals(part))
-    		{
-    			if (!normalizedParts.isEmpty())
-    			{
-    				normalizedParts.remove(normalizedParts.size() - 1);
-    				continue;
-    			}
-    		}
-    		normalizedParts.add(part);
-    	}
-    	return normalizedParts;
+        String[] parts = StringUtils.split(path, "\\/");
+        List<String> normalizedParts = new ArrayList<String>();
+        for (String part : parts)
+        {
+            if (".".equals(part))
+            {
+                continue;
+            }
+            if ("..".equals(part))
+            {
+                if (!normalizedParts.isEmpty())
+                {
+                    normalizedParts.remove(normalizedParts.size() - 1);
+                    continue;
+                }
+            }
+            normalizedParts.add(part);
+        }
+        return normalizedParts;
     }
 
     @Override

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/jdbc/SchemaType.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/jdbc/SchemaType.java?rev=993517&r1=993516&r2=993517&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/jdbc/SchemaType.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/jdbc/SchemaType.java
Tue Sep  7 20:19:37 2010
@@ -29,35 +29,65 @@ import java.sql.Types;
  */
 public enum SchemaType
 {
+    /** JDBC Datatype BIT. */
     BIT(Types.BIT),
+    /** JDBC Datatype TINYINT. */
     TINYINT(Types.TINYINT),
+    /** JDBC Datatype SMALLINT. */
     SMALLINT(Types.SMALLINT),
+    /** JDBC Datatype INTEGER. */
     INTEGER(Types.INTEGER),
+    /** JDBC Datatype BIGINT. */
     BIGINT(Types.BIGINT),
+    /** JDBC Datatype FLOAT. */
     FLOAT(Types.FLOAT),
+    /** JDBC Datatype REAL. */
     REAL(Types.REAL),
+    /** JDBC Datatype NUMERIC. */
     NUMERIC(Types.NUMERIC),
+    /** JDBC Datatype DECIMAL. */
     DECIMAL(Types.DECIMAL),
+    /** JDBC Datatype CHAR. */
     CHAR(Types.CHAR),
+    /** JDBC Datatype VARCHAR. */
     VARCHAR(Types.VARCHAR),
+    /** JDBC Datatype LONGVARCHAR. */
     LONGVARCHAR(Types.LONGVARCHAR),
+    /** JDBC Datatype DATE. */
     DATE(Types.DATE),
+    /** JDBC Datatype TIME. */
     TIME(Types.TIME),
+    /** JDBC Datatype TIMESTAMP. */
     TIMESTAMP(Types.TIMESTAMP),
+    /** JDBC Datatype BINARY. */
     BINARY(Types.BINARY),
+    /** JDBC Datatype VARBINARY. */
     VARBINARY(Types.VARBINARY),
+    /** JDBC Datatype LONGVARBINARY. */
     LONGVARBINARY(Types.LONGVARBINARY),
+    /** JDBC Datatype NULL. */
     NULL(Types.NULL),
+    /** JDBC Datatype OTHER. */
     OTHER(Types.OTHER),
+    /** JDBC Datatype JAVA_OBJECT. */
     JAVA_OBJECT(Types.JAVA_OBJECT),
+    /** JDBC Datatype DISTINCT. */
     DISTINCT(Types.DISTINCT),
+    /** JDBC Datatype STRUCT. */
     STRUCT(Types.STRUCT),
+    /** JDBC Datatype ARRAY. */
     ARRAY(Types.ARRAY),
+    /** JDBC Datatype BLOB. */
     BLOB(Types.BLOB),
+    /** JDBC Datatype CLOB. */
     CLOB(Types.CLOB),
+    /** JDBC Datatype REF. */
     REF(Types.REF),
+    /** JDBC Datatype INTEGER interpreted as Boolean. */
     BOOLEANINT(null),
+    /** JDBC Datatype CHAR interpreted as Boolean. */
     BOOLEANCHAR(null),
+    /** JDBC Datatype DOUBLE. */
     DOUBLE(Types.DOUBLE);
 
     /**

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=993517&r1=993516&r2=993517&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
Tue Sep  7 20:19:37 2010
@@ -43,13 +43,13 @@ public class JavadocOutlet extends Outle
     public static final String ATTRIBUTES_MERGEPOINT_NAME = "attributes";
 
     /** The first line of the javadoc. */
-    private static String START_LINE = "/**";
+    private static final String START_LINE = "/**";
 
     /** The last line of the javadoc. */
-    private static String END_LINE = " */";
+    private static final String END_LINE = " */";
 
     /** The character which starts a javadoc attribute. */
-    private static String JAVADOC_ATTRIBUTE_START = "@";
+    private static final String JAVADOC_ATTRIBUTE_START = "@";
 
     /** The line break string. */
     private String lineBreak = "\n";
@@ -141,7 +141,7 @@ public class JavadocOutlet extends Outle
         String token = null;
         String currentIndent = indent + " * ";
         String lastJavadocAttribute = null;
-        while (tokenizer.hasMoreTokens() || token!= null)
+        while (tokenizer.hasMoreTokens() || token != null)
         {
             if (token == null)
             {

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/ColumnMetadata.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/ColumnMetadata.java?rev=993517&r1=993516&r2=993517&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/ColumnMetadata.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/ColumnMetadata.java
Tue Sep  7 20:19:37 2010
@@ -19,16 +19,48 @@ package org.apache.torque.generator.sour
  * under the License.
  */
 
+/**
+ * The data retrieved about a column as read from JDBC Metadata.
+ *
+ * @version $Id: $
+ */
 public class ColumnMetadata
 {
+    /** The column name. */
     private String name;
+
+    /** The data type of the column, as in java.sql.Types. */
     private Integer sqlType;
+
+    /** The maximum size of the column. */
     private Integer size;
+
+    /**
+     * 0 if the column may not be null,
+     * 1 if the column may be known,
+     * 2 unknown. */
     private Integer nullType;
+
+    /** The default value of the column, or null if no default value exists. */
     private String defValue;
+
+    /** The number of decimal digits of the column. */
     private Integer decimalDigits;
 
 
+    /**
+     * Constructor.
+     *
+     * @param name The name of the column.
+     * @param sqlType The data type of the column.
+     * @param size The maximum size of the column.
+     * @param nullType 0 if the column may not be null,
+     *        1 if the column may be known,
+     *        2 unknown.
+     * @param defValue The default value of the column,
+     *        or null if no default value exists.
+     * @param decimalDigits The number of decimal digits of the column.
+     */
     public ColumnMetadata(
             String name,
             Integer sqlType,
@@ -37,7 +69,6 @@ public class ColumnMetadata
             String defValue,
             Integer decimalDigits)
     {
-        super();
         this.name = name;
         this.sqlType = sqlType;
         this.size = size;
@@ -47,36 +78,68 @@ public class ColumnMetadata
     }
 
 
+    /**
+     * Returns the name of the column.
+     *
+     * @return the name of the column.
+     */
     public String getName()
     {
         return name;
     }
 
 
+    /**
+     * Returns the data type of the column.
+     *
+     * @return the data type of the column as in java.sql.Types.
+     */
     public Integer getSqlType()
     {
         return sqlType;
     }
 
 
+    /**
+     * Returns the maximum size of the column.
+     *
+     * @return the maximum size of the column.
+     */
     public Integer getSize()
     {
         return size;
     }
 
 
+    /**
+     * Returns whether the column may be null.
+     *
+     * @return 0 if the column may not be null,
+     *         1 if the column may be known,
+     *         2 unknown.
+     */
     public Integer getNullType()
     {
         return nullType;
     }
 
 
+    /**
+     * Returns the default value of the column.
+     *
+     * @return the default value, or 0 if no default value exists.
+     */
     public String getDefValue()
     {
         return defValue;
     }
 
 
+    /**
+     * Returns the number of decimal digits.
+     *
+     * @return the number of decimal digits.
+     */
     public Integer getDecimalDigits()
     {
         return decimalDigits;

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/ForeignKeyMetadata.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/ForeignKeyMetadata.java?rev=993517&r1=993516&r2=993517&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/ForeignKeyMetadata.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/ForeignKeyMetadata.java
Tue Sep  7 20:19:37 2010
@@ -22,41 +22,82 @@ package org.apache.torque.generator.sour
 import java.util.ArrayList;
 import java.util.List;
 
+/**
+ * The data about a foreign key as read from JDBC Metadata.
+ *
+ * @version $Id: $
+ */
 public class ForeignKeyMetadata
 {
+    /** The name of the referenced (foreign) table. */
     private String referencedTable;
 
+    /** The name of the foreign key. */
     private String foreignKeyName;
 
+    /** The local columns of the foreign key. */
     private List<String> localColumns = new ArrayList<String>();
 
+    /** The foreign columns of the foreign key. */
     private List<String> foreignColumns = new ArrayList<String>();
 
+    /**
+     * Returns the name of the referenced (foreign) table.
+     *
+     * @return the name of the referenced (foreign) table.
+     */
     public String getReferencedTable()
     {
         return referencedTable;
     }
 
+    /**
+     * Sets the name of the referenced (foreign) table.
+     *
+     * @param referencedTable the name of the referenced (foreign) table.
+     */
     public void setReferencedTable(String referencedTable)
     {
         this.referencedTable = referencedTable;
     }
 
+    /**
+     * Returns the name of the foreign key.
+     *
+     * @return the name of the foreign key.
+     */
     public String getForeignKeyName()
     {
         return foreignKeyName;
     }
 
+    /**
+     * Sets the name of the foreign key.
+     *
+     * @param foreignKeyName the name of the foreign key.
+     */
     public void setForeignKeyName(String foreignKeyName)
     {
         this.foreignKeyName = foreignKeyName;
     }
 
+    /**
+     * Returns the names of the local columns.
+     * To change the list in this object, the returned list can be modified.
+     *
+     * @return the names of the local columns.
+     */
     public List<String> getLocalColumns()
     {
         return localColumns;
     }
 
+    /**
+     * Returns the names of the foreign columns.
+     * To change the list in this object, the returned list can be modified.
+     *
+     * @return the names of the foreign columns.
+     */
     public List<String> getForeignColumns()
     {
         return foreignColumns;

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSource.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSource.java?rev=993517&r1=993516&r2=993517&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSource.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSource.java
Tue Sep  7 20:19:37 2010
@@ -42,18 +42,41 @@ import org.apache.torque.generator.sourc
 import org.apache.torque.generator.source.SourceException;
 import org.apache.torque.generator.source.SourceImpl;
 
+/**
+ * A source which reads the data from JDBC Metadata.
+ *
+ * @version $Id: $
+ */
 public class JdbcMetadataSource extends SourceImpl
 {
+    /** The class log. */
     private static Log log = LogFactory.getLog(JdbcMetadataSource.class);
 
+    /** The fully qualified class name of the database driver. */
     private String driver;
 
+    /** The connection url to the database, */
     private String url;
+
+    /** The username to connect to the database. */
     private String username;
+
+    /** The password to connect to the database. */
     private String password;
+
+    /** Which database(mysql) or schema (oracle) should be read. */
     private String schema;
 
 
+    /**
+     * Constructor.
+     *
+     * @param driver the database driver class, not null.
+     * @param url the connection url, not null.
+     * @param username the username of the database user.
+     * @param password the password of the database user.
+     * @param schema the schema to read.
+     */
     public JdbcMetadataSource(
             String driver,
             String url,

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSourceProvider.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSourceProvider.java?rev=993517&r1=993516&r2=993517&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSourceProvider.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/jdbc/JdbcMetadataSourceProvider.java
Tue Sep  7 20:19:37 2010
@@ -62,6 +62,7 @@ public class JdbcMetadataSourceProvider 
     /** JDBC schema. */
     private String schema;
 
+    /** Whether next() was already called. */
     private boolean nextCalled = false;
 
     public JdbcMetadataSourceProvider(

Modified: db/torque/torque4/trunk/torque-generator/src/test/file/1.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/file/1.properties?rev=993517&r1=993516&r2=993517&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/file/1.properties (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/file/1.properties Tue Sep  7 20:19:37
2010
@@ -15,4 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-1=1
\ No newline at end of file
+1=1

Modified: db/torque/torque4/trunk/torque-generator/src/test/file/11.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/file/11.properties?rev=993517&r1=993516&r2=993517&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/file/11.properties (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/file/11.properties Tue Sep  7 20:19:37
2010
@@ -15,4 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-11=11
\ No newline at end of file
+11=11

Modified: db/torque/torque4/trunk/torque-generator/src/test/file/subfolder/2.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/file/subfolder/2.properties?rev=993517&r1=993516&r2=993517&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/file/subfolder/2.properties (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/file/subfolder/2.properties Tue Sep
 7 20:19:37 2010
@@ -15,4 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-2=2
\ No newline at end of file
+2=2

Modified: db/torque/torque4/trunk/torque-generator/src/test/file/subfolder/subsubfolder/3.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/file/subfolder/subsubfolder/3.properties?rev=993517&r1=993516&r2=993517&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/file/subfolder/subsubfolder/3.properties
(original)
+++ db/torque/torque4/trunk/torque-generator/src/test/file/subfolder/subsubfolder/3.properties
Tue Sep  7 20:19:37 2010
@@ -15,4 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-3=3
\ No newline at end of file
+3=3

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ReadConfigurationTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ReadConfigurationTest.java?rev=993517&r1=993516&r2=993517&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ReadConfigurationTest.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ReadConfigurationTest.java
Tue Sep  7 20:19:37 2010
@@ -881,7 +881,7 @@ public class ReadConfigurationTest exten
                                 "org.apache.torque.generator.test.readConfiguration.javaOutlet"));
                 assertEquals("Foo2", outlet.getFoo());
                 assertEquals("Bar2", outlet.getBar());
-                Map<String,MergepointMapping> mergepointMappings
+                Map<String, MergepointMapping> mergepointMappings
                         = outlet.getMergepointMappings();
                 assertEquals(3, mergepointMappings.size());
                 {

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationTest.java?rev=993517&r1=993516&r2=993517&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationTest.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationTest.java
Tue Sep  7 20:19:37 2010
@@ -26,7 +26,6 @@ import java.util.List;
 
 import org.apache.torque.generator.configuration.ConfigurationException;
 import org.apache.torque.generator.configuration.mergepoint.MergepointMapping;
-import org.apache.torque.generator.configuration.outlet.OutletConfiguration;
 import org.apache.torque.generator.control.action.ApplyAction;
 import org.apache.torque.generator.java.JavaOutlet;
 import org.apache.torque.generator.outlet.Outlet;
@@ -36,9 +35,6 @@ import org.junit.Test;
 
 public class OutletConfigurationTest
 {
-    private OutletConfiguration outletConfiguration;
-
-
     /**
      * Tests that getOutlets returns the correct result.
      *

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/DeeplyNestedMergepointsTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/DeeplyNestedMergepointsTest.java?rev=993517&r1=993516&r2=993517&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/DeeplyNestedMergepointsTest.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/DeeplyNestedMergepointsTest.java
Tue Sep  7 20:19:37 2010
@@ -33,7 +33,6 @@ import org.apache.torque.generator.confi
 import org.apache.torque.generator.configuration.paths.CustomProjectPaths;
 import org.apache.torque.generator.configuration.paths.DefaultTorqueGeneratorPaths;
 import org.apache.torque.generator.configuration.paths.Maven2DirectoryProjectPaths;
-import org.apache.torque.generator.control.Controller;
 import org.junit.Test;
 
 /**
@@ -67,9 +66,11 @@ public class DeeplyNestedMergepointsTest
         StringBuilder content = new StringBuilder();
         int readChars;
         char[] buffer = new char[50];
-        do {
+        do
+        {
             readChars = fileReader.read(buffer);
-            if (readChars != -1) {
+            if (readChars != -1)
+            {
                 content.append(buffer, 0, readChars);
             }
         }

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/java/JavaOutlet.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/java/JavaOutlet.java?rev=993517&r1=993516&r2=993517&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/java/JavaOutlet.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/java/JavaOutlet.java
Tue Sep  7 20:19:37 2010
@@ -64,7 +64,8 @@ public class JavaOutlet extends OutletIm
             {
                 return false;
             }
-        } else if (!bar.equals(other.bar))
+        }
+        else if (!bar.equals(other.bar))
         {
             return false;
         }
@@ -74,7 +75,8 @@ public class JavaOutlet extends OutletIm
             {
                 return false;
             }
-        } else if (!foo.equals(other.foo))
+        }
+        else if (!foo.equals(other.foo))
         {
             return false;
         }
@@ -88,7 +90,8 @@ public class JavaOutlet extends OutletIm
             {
                 return false;
             }
-        } else if (!getInputElementName().equals(other.getInputElementName()))
+        }
+        else if (!getInputElementName().equals(other.getInputElementName()))
         {
             return false;
         }

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/java/NewlineOutletTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/java/NewlineOutletTest.java?rev=993517&r1=993516&r2=993517&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/java/NewlineOutletTest.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/outlet/java/NewlineOutletTest.java
Tue Sep  7 20:19:37 2010
@@ -22,7 +22,6 @@ package org.apache.torque.generator.outl
 import static org.junit.Assert.assertEquals;
 
 import org.apache.torque.generator.GeneratorException;
-import org.apache.torque.generator.outlet.java.NewlineOutlet;
 import org.apache.torque.generator.qname.QualifiedName;
 import org.junit.Before;
 import org.junit.Test;
@@ -39,34 +38,39 @@ public class NewlineOutletTest
     }
 
     @Test
-    public void testDefault() throws GeneratorException {
+    public void testDefault() throws GeneratorException
+    {
         String result = newlineOutlet.execute(null);
         assertEquals("\n", result);
     }
 
     @Test
-    public void testWindowsStyle() throws GeneratorException {
+    public void testWindowsStyle() throws GeneratorException
+    {
         newlineOutlet.setWindowsStyle(true);
         String result = newlineOutlet.execute(null);
         assertEquals("\r\n", result);
     }
 
     @Test()
-    public void testCountZero() throws GeneratorException {
+    public void testCountZero() throws GeneratorException
+    {
         newlineOutlet.setCount(0);
         String result = newlineOutlet.execute(null);
         assertEquals("", result);
     }
 
     @Test(expected = GeneratorException.class)
-    public void testCountLessThanZero() throws GeneratorException {
+    public void testCountLessThanZero() throws GeneratorException
+    {
         newlineOutlet.setCount(-1);
         String result = newlineOutlet.execute(null);
         assertEquals("\n", result);
     }
 
     @Test()
-    public void testCountFive() throws GeneratorException {
+    public void testCountFive() throws GeneratorException
+    {
         newlineOutlet.setCount(5);
         String result = newlineOutlet.execute(null);
         assertEquals("\n\n\n\n\n", result);

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/SourcePathTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/SourcePathTest.java?rev=993517&r1=993516&r2=993517&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/SourcePathTest.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/SourcePathTest.java
Tue Sep  7 20:19:37 2010
@@ -59,7 +59,7 @@ public class SourcePathTest
                 SourcePath.getPathAsString(thirdLevel));
     }
 
-    @Test(expected=GeneratorException.class)
+    @Test(expected = GeneratorException.class)
     public void testGetPathInfiniteLoop() throws GeneratorException
     {
         SourceElement loopElement1 = new SourceElement("loopElement1");

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/template/velocity/VelocityTemplateFilterTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/template/velocity/VelocityTemplateFilterTest.java?rev=993517&r1=993516&r2=993517&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/template/velocity/VelocityTemplateFilterTest.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/template/velocity/VelocityTemplateFilterTest.java
Tue Sep  7 20:19:37 2010
@@ -27,13 +27,12 @@ import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.Reader;
 
-import org.apache.torque.generator.template.velocity.VelocityTemplateFilter;
 import org.junit.Before;
 import org.junit.Test;
 
 public class VelocityTemplateFilterTest
 {
-    VelocityTemplateFilter velocityTemplateFilter;
+    private VelocityTemplateFilter velocityTemplateFilter;
 
     @Before
     public void setUp()
@@ -145,7 +144,7 @@ public class VelocityTemplateFilterTest
         }
 
         StringBuffer contentBuffer = new StringBuffer();
-        while(true)
+        while (true)
         {
             char[] charBuffer = new char[8192];
             int filledChars = reader.read(charBuffer);

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/variable/VariableTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/variable/VariableTest.java?rev=993517&r1=993516&r2=993517&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/variable/VariableTest.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/variable/VariableTest.java
Tue Sep  7 20:19:37 2010
@@ -26,7 +26,6 @@ import static org.junit.Assert.fail;
 import org.apache.torque.generator.BaseTest;
 import org.apache.torque.generator.qname.Namespace;
 import org.apache.torque.generator.qname.QualifiedName;
-import org.apache.torque.generator.variable.Variable;
 import org.junit.Test;
 
 /**
@@ -47,7 +46,7 @@ public class VariableTest extends BaseTe
         assertEquals(
                 new Namespace("org.apache.torque"),
                 variable.getName().getNamespace());
-        assertEquals("generator",variable.getName().getName());
+        assertEquals("generator", variable.getName().getName());
         assertEquals("value", variable.getValue());
         assertEquals(Variable.Scope.FILE, variable.getScope());
 
@@ -61,12 +60,13 @@ public class VariableTest extends BaseTe
         }
         catch (NullPointerException e)
         {
+            // expected
         }
 
         try
         {
             variable = new Variable(
-                    new QualifiedName("org.apache.torque","generator"),
+                    new QualifiedName("org.apache.torque", "generator"),
                     new Object(),
                     null);
             fail("NullPointerException expected");
@@ -76,7 +76,7 @@ public class VariableTest extends BaseTe
         }
 
         variable = new Variable(
-                new QualifiedName("org.apache.torque","generator"),
+                new QualifiedName("org.apache.torque", "generator"),
                 null,
                 Variable.Scope.GLOBAL);
         assertNull(variable.getValue());



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