Return-Path: X-Original-To: apmail-db-torque-dev-archive@www.apache.org Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 17BD011062 for ; Wed, 3 Sep 2014 19:17:43 +0000 (UTC) Received: (qmail 44647 invoked by uid 500); 3 Sep 2014 19:17:43 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 44612 invoked by uid 500); 3 Sep 2014 19:17:43 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 44601 invoked by uid 500); 3 Sep 2014 19:17:42 -0000 Received: (qmail 44598 invoked by uid 99); 3 Sep 2014 19:17:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2014 19:17:42 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2014 19:17:19 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A9B6E23888D2; Wed, 3 Sep 2014 19:17:17 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: torque-commits@db.apache.org From: tfischer@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140903191717.A9B6E23888D2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 getTemplateNames() + public Collection 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 getTemplateNames() + Collection 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 getTemplateNames() + public Collection 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 getTemplateNames() + public Collection 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 getAllResourcesEndingWith( + public Collection 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 getFilesInDirectoryWithSuffix( + static Collection 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 getFilesInJarDirectoryWithSuffix( + static Collection 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 templateFileNames + Collection 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