Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 23214 invoked from network); 17 Dec 2007 09:06:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Dec 2007 09:06:45 -0000 Received: (qmail 79982 invoked by uid 500); 17 Dec 2007 09:06:34 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 79919 invoked by uid 500); 17 Dec 2007 09:06:34 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 79908 invoked by uid 99); 17 Dec 2007 09:06:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Dec 2007 01:06:34 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Dec 2007 09:06:30 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1B2AA1A984E; Mon, 17 Dec 2007 01:06:21 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r604800 - in /geronimo/server/trunk: framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/ framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/util/ plugins/j2ee/geronimo-j2ee-bui... Date: Mon, 17 Dec 2007 09:06:20 -0000 To: scm@geronimo.apache.org From: djencks@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071217090621.1B2AA1A984E@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: djencks Date: Mon Dec 17 01:06:18 2007 New Revision: 604800 URL: http://svn.apache.org/viewvc?rev=604800&view=rev Log: GERONIMO-3710 fix CCE through the miracle of generics and a bit of cleanup Modified: geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/util/DeploymentUtil.java geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java Modified: geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java?rev=604800&r1=604799&r2=604800&view=diff ============================================================================== --- geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java (original) +++ geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java Mon Dec 17 01:06:18 2007 @@ -538,7 +538,7 @@ additionalDeployment.add(configurationData); } - public List getAdditionalDeployment() { + public List getAdditionalDeployment() { return additionalDeployment; } Modified: geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/util/DeploymentUtil.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/util/DeploymentUtil.java?rev=604800&r1=604799&r2=604800&view=diff ============================================================================== --- geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/util/DeploymentUtil.java (original) +++ geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/util/DeploymentUtil.java Mon Dec 17 01:06:18 2007 @@ -28,10 +28,10 @@ import java.io.Writer; import java.net.MalformedURLException; import java.net.URL; +import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Enumeration; -import java.util.LinkedList; import java.util.jar.JarFile; import java.util.jar.JarOutputStream; import java.util.jar.Manifest; @@ -82,7 +82,7 @@ public static void copyFile(File source, File destination) throws IOException { File destinationDir = destination.getParentFile(); - if (false == destinationDir.exists() && false == destinationDir.mkdirs()) { + if (!destinationDir.exists() && !destinationDir.mkdirs()) { throw new java.io.IOException("Cannot create directory : " + destinationDir); } @@ -300,7 +300,7 @@ } - public static boolean recursiveDelete(File root, Collection unableToDeleteCollection) { + public static boolean recursiveDelete(File root, Collection unableToDeleteCollection) { if (root == null) { return true; } @@ -318,37 +318,36 @@ } } // help out the GC of file handles by nulling the references - file = null; files[i] = null; } } } - boolean rootDeleteStatus = false; + boolean rootDeleteStatus; if (!(rootDeleteStatus = root.delete()) && unableToDeleteCollection != null) - unableToDeleteCollection.add(root); + unableToDeleteCollection.add(root.getAbsolutePath()); return rootDeleteStatus; } public static boolean recursiveDelete(File root) { - return recursiveDelete(root,null); + return recursiveDelete(root, null); } - public static Collection listRecursiveFiles(File file) { - LinkedList list = new LinkedList(); + public static Collection listRecursiveFiles(File file) { + Collection list = new ArrayList(); listRecursiveFiles(file, list); return Collections.unmodifiableCollection(list); } - public static void listRecursiveFiles(File file, Collection collection) { + public static void listRecursiveFiles(File file, Collection collection) { File[] files = file.listFiles(); if ( null == files ) { return; } - for (int i = 0; i < files.length; i++) { - collection.add(files[i]); - if (files[i].isDirectory()) { - listRecursiveFiles(files[i], collection); + for (File file1 : files) { + collection.add(file1); + if (file1.isDirectory()) { + listRecursiveFiles(file1, collection); } } } Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java?rev=604800&r1=604799&r2=604800&view=diff ============================================================================== --- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java (original) +++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java Mon Dec 17 01:06:18 2007 @@ -999,10 +999,7 @@ private boolean isLibraryEntry(ApplicationType application, ZipEntry entry) { String libDir = getLibraryDirectory(application); - if (libDir != null && entry.getName().startsWith(libDir)) { - return true; - } - return false; + return libDir != null && entry.getName().startsWith(libDir); } private void mapVendorPlans(GerApplicationType gerApplication, Map altVendorDDs, JarFile earFile) throws DeploymentException {