Return-Path: X-Original-To: apmail-db-derby-commits-archive@www.apache.org Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D096510027 for ; Thu, 13 Mar 2014 10:22:12 +0000 (UTC) Received: (qmail 68192 invoked by uid 500); 13 Mar 2014 10:20:33 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 67377 invoked by uid 500); 13 Mar 2014 10:15:51 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 67278 invoked by uid 99); 13 Mar 2014 10:15:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Mar 2014 10:15:27 +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; Thu, 13 Mar 2014 10:15:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id F00E823888D7; Thu, 13 Mar 2014 10:15:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1577083 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/services/io/FileUtil.java impl/services/monitor/FileMonitor.java impl/services/reflect/DatabaseClasses.java Date: Thu, 13 Mar 2014 10:15:02 -0000 To: derby-commits@db.apache.org From: kahatlen@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140313101502.F00E823888D7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kahatlen Date: Thu Mar 13 10:15:02 2014 New Revision: 1577083 URL: http://svn.apache.org/r1577083 Log: DERBY-6505: Clean up dead code in FileUtil Remove FileUtil.newFile(), which is a workaround for a bug in old Java versions that are no longer supported. Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FileUtil.java db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/FileMonitor.java db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/DatabaseClasses.java Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FileUtil.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FileUtil.java?rev=1577083&r1=1577082&r2=1577083&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FileUtil.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FileUtil.java Thu Mar 13 10:15:02 2014 @@ -445,20 +445,6 @@ public abstract class FileUtil { } // end of copyFile /** - A replacement for new File(File, String) that correctly implements - the case when the first argument is null. The documentation for java.io.File - says that new File((File) null, name) is the same as new File(name). - This is not the case in pre 1.1.8 vms, a NullPointerException is thrown instead. - */ - public static File newFile(File parent, String name) { - - if (parent == null) - return new File(name); - else - return new File(parent, name); - } - - /** Remove the leading 'file://' protocol from a filename which has been expressed as an URL. If the filename is not an URL, then nothing is done. Otherwise, an URL like 'file:///tmp/foo.txt' is transformed into the legal Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/FileMonitor.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/FileMonitor.java?rev=1577083&r1=1577082&r2=1577083&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/FileMonitor.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/FileMonitor.java Thu Mar 13 10:15:02 2014 @@ -63,7 +63,7 @@ public final class FileMonitor extends B private InputStream PBapplicationPropertiesStream() throws IOException { - File sr = FileUtil.newFile(home, Property.PROPERTIES_FILE); + File sr = new File(home, Property.PROPERTIES_FILE); if (!sr.exists()) return null; Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/DatabaseClasses.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/DatabaseClasses.java?rev=1577083&r1=1577082&r2=1577083&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/DatabaseClasses.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/DatabaseClasses.java Thu Mar 13 10:15:02 2014 @@ -34,7 +34,6 @@ import org.apache.derby.iapi.reference.M import org.apache.derby.iapi.reference.Property; import org.apache.derby.iapi.reference.SQLState; import org.apache.derby.iapi.services.i18n.MessageService; -import org.apache.derby.iapi.services.io.FileUtil; import org.apache.derby.iapi.services.loader.ClassFactory; import org.apache.derby.iapi.services.loader.ClassInspector; import org.apache.derby.iapi.services.loader.GeneratedClass; @@ -172,7 +171,7 @@ abstract class DatabaseClasses Object env = Monitor.getMonitor().getEnvironment(); File dir = env instanceof File ? (File) env : null; - final File classFile = FileUtil.newFile(dir,filename); + final File classFile = new File(dir, filename); // find the error stream HeaderPrintWriter errorStream = Monitor.getStream();