db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1622320 - in /db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration: ./ outlet/
Date Wed, 03 Sep 2014 19:17:17 GMT
Author: tfischer
Date: Wed Sep  3 19:17:17 2014
New Revision: 1622320

URL: http://svn.apache.org/r1622320
Log:
use collection not list as return value of files list and template list as entries have no
defined order

Modified:
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/ClasspathConfigurationProvider.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/ConfigurationProvider.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/DirectoryConfigurationProvider.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/JarConfigurationProvider.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/PackageResources.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationXmlParser.java

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/ClasspathConfigurationProvider.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/ClasspathConfigurationProvider.java?rev=1622320&r1=1622319&r2=1622320&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/ClasspathConfigurationProvider.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/ClasspathConfigurationProvider.java
Wed Sep  3 19:17:17 2014
@@ -22,7 +22,6 @@ package org.apache.torque.generator.conf
 import java.io.BufferedInputStream;
 import java.io.InputStream;
 import java.util.Collection;
-import java.util.List;
 
 import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.logging.Log;
@@ -134,7 +133,7 @@ public class ClasspathConfigurationProvi
     /**
      * @see ConfigurationProvider#getTemplateNames()
      */
-    public List<String> getTemplateNames()
+    public Collection<String> getTemplateNames()
             throws ConfigurationException
     {
         String templatesConfigurationSubdir = getConfigResourceBase()

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/ConfigurationProvider.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/ConfigurationProvider.java?rev=1622320&r1=1622319&r2=1622320&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/ConfigurationProvider.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/ConfigurationProvider.java
Wed Sep  3 19:17:17 2014
@@ -21,7 +21,6 @@ package org.apache.torque.generator.conf
 
 import java.io.InputStream;
 import java.util.Collection;
-import java.util.List;
 
 /**
  * Defines how the configuration for a generation unit can be accessed.
@@ -58,12 +57,12 @@ public interface ConfigurationProvider
     /**
      * Lists all available template names.
      *
-     * @return a list of all available template names, not null.
+     * @return a collection of all available template names, not null.
      *
      * @throws ConfigurationException if the template names
      *         cannot be determined.
      */
-    List<String> getTemplateNames()
+    Collection<String> getTemplateNames()
                 throws ConfigurationException;
 
     /**

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/DirectoryConfigurationProvider.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/DirectoryConfigurationProvider.java?rev=1622320&r1=1622319&r2=1622320&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/DirectoryConfigurationProvider.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/DirectoryConfigurationProvider.java
Wed Sep  3 19:17:17 2014
@@ -181,7 +181,7 @@ public class DirectoryConfigurationProvi
     /**
      * @see ConfigurationProvider#getTemplateNames()
      */
-    public List<String> getTemplateNames()
+    public Collection<String> getTemplateNames()
             throws ConfigurationException
     {
         File templatesConfigurationSubdir = new File(

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/JarConfigurationProvider.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/JarConfigurationProvider.java?rev=1622320&r1=1622319&r2=1622320&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/JarConfigurationProvider.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/JarConfigurationProvider.java
Wed Sep  3 19:17:17 2014
@@ -23,7 +23,6 @@ import java.io.BufferedInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Collection;
-import java.util.List;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
 
@@ -152,7 +151,7 @@ public class JarConfigurationProvider
     /**
      * @see ConfigurationProvider#getTemplateNames()
      */
-    public List<String> getTemplateNames()
+    public Collection<String> getTemplateNames()
             throws ConfigurationException
     {
         JarFile templatesConfigurationFile;

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/PackageResources.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/PackageResources.java?rev=1622320&r1=1622319&r2=1622320&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/PackageResources.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/PackageResources.java
Wed Sep  3 19:17:17 2014
@@ -23,6 +23,7 @@ import java.io.File;
 import java.io.IOException;
 import java.net.URL;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Enumeration;
 import java.util.List;
 import java.util.jar.JarEntry;
@@ -176,11 +177,11 @@ public class PackageResources
      * @param recurse true if subpackages should also be searched,
      *        false if only the specified package should be searched.
      *
-     * @return The list of resource names with the specified suffix,
+     * @return A collection of resource names with the specified suffix,
      *         not null. The contained file names are relative to
      *         the scanned package.
      */
-    public List<String> getAllResourcesEndingWith(
+    public Collection<String> getAllResourcesEndingWith(
             final String suffix,
             final boolean recurse)
     {
@@ -219,9 +220,9 @@ public class PackageResources
      *        to be able to recurse in subdirectories
      * @param recurse whether to scan subdirectories.
      *
-     * @return the list of matching files, not null.
+     * @return a collection of matching files, not null.
      */
-    static List<String> getFilesInDirectoryWithSuffix(
+    static Collection<String> getFilesInDirectoryWithSuffix(
             final File directoryToScan,
             final String suffix,
             final String prefixToResult,
@@ -295,12 +296,12 @@ public class PackageResources
      * @param searchSubdirectories if files in subdirectories should
      *        also be considered.
      *
-     * @return a set with the names of all outlet configuration files
+     * @return a collection with the names of all outlet configuration files
      *         contained in the jar file.
      * @throws NullPointerException if jarFile
      *         or outletConfigurationDirectory is null
      */
-    static List<String> getFilesInJarDirectoryWithSuffix(
+    static Collection<String> getFilesInJarDirectoryWithSuffix(
             final String directory,
             final JarFile jarFile,
             final String suffix,

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationXmlParser.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationXmlParser.java?rev=1622320&r1=1622319&r2=1622320&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationXmlParser.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/outlet/OutletConfigurationXmlParser.java
Wed Sep  3 19:17:17 2014
@@ -259,7 +259,7 @@ public class OutletConfigurationXmlParse
         {
             outletNames.add(outlet.getName());
         }
-        List<String> templateFileNames
+        Collection<String> templateFileNames
             = configurationProvider.getTemplateNames();
         for (String templateFileName : templateFileNames)
         {



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