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 692FE7AB2 for ; Fri, 2 Sep 2011 07:29:20 +0000 (UTC) Received: (qmail 71028 invoked by uid 500); 2 Sep 2011 07:29:20 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 70955 invoked by uid 500); 2 Sep 2011 07:29:14 -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 70924 invoked by uid 99); 2 Sep 2011 07:29:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Sep 2011 07:29:13 +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; Fri, 02 Sep 2011 07:29:06 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 6C5A32388900; Fri, 2 Sep 2011 07:28:45 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1164380 - in /db/derby/code/branches/10.6: ./ java/engine/org/apache/derby/impl/io/VFMemoryStorageFactory.java Date: Fri, 02 Sep 2011 07:28:45 -0000 To: derby-commits@db.apache.org From: kristwaa@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110902072845.6C5A32388900@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kristwaa Date: Fri Sep 2 07:28:44 2011 New Revision: 1164380 URL: http://svn.apache.org/viewvc?rev=1164380&view=rev Log: DERBY-5393: Remove old in-memory database purge mechanism Merged fix from trunk (revision 1164370). Modified: db/derby/code/branches/10.6/ (props changed) db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/io/VFMemoryStorageFactory.java Propchange: db/derby/code/branches/10.6/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Sep 2 07:28:44 2011 @@ -1,3 +1,3 @@ /db/derby/code/branches/10.7:1140196 -/db/derby/code/trunk:938547,938796,938959,939231,940462,940469,941627,942031,942286,942476,942480,942587,944152,946794,948045,948069,951346,951366,952138,952237,952581,954344,954421,954544,954748,955001,955540,955634,956075,956234,956445,956569,956659,957260,957902,958163,958257,958264,958508,958522,958555,958618,958939,959550,961892,962716,963206,963705,964039,964115,964402,965647,966393,967201,967304,980089,980684,986689,986834,987539,989099,990292,997325,998170,999119,999479,999485,1002291,1002682,1002853,1021426,1024511,1024528,1025615,1025795,1028716,1030043,1033485,1033864,1035164,1038514,1040658,1053724,1055169,1062096,1063809,1065061,1067250,1069661,1071886,1078461,1081455,1097247,1103681,1103718,1136363,1138341,1138444,1141924 +/db/derby/code/trunk:938547,938796,938959,939231,940462,940469,941627,942031,942286,942476,942480,942587,944152,946794,948045,948069,951346,951366,952138,952237,952581,954344,954421,954544,954748,955001,955540,955634,956075,956234,956445,956569,956659,957260,957902,958163,958257,958264,958508,958522,958555,958618,958939,959550,961892,962716,963206,963705,964039,964115,964402,965647,966393,967201,967304,980089,980684,986689,986834,987539,989099,990292,997325,998170,999119,999479,999485,1002291,1002682,1002853,1021426,1024511,1024528,1025615,1025795,1028716,1030043,1033485,1033864,1035164,1038514,1040658,1053724,1055169,1062096,1063809,1065061,1067250,1069661,1071886,1078461,1081455,1097247,1103681,1103718,1136363,1138341,1138444,1141924,1164370 /db/derby/docs/trunk:954344 Modified: db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/io/VFMemoryStorageFactory.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/io/VFMemoryStorageFactory.java?rev=1164380&r1=1164379&r2=1164380&view=diff ============================================================================== --- db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/io/VFMemoryStorageFactory.java (original) +++ db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/io/VFMemoryStorageFactory.java Fri Sep 2 07:28:44 2011 @@ -63,26 +63,6 @@ public class VFMemoryStorageFactory */ private static final DataStore DUMMY_STORE = new DataStore("::DUMMY::"); - /** - * TODO: Remove this method once the new mechanism has been added. - * Deletes the database if it exists. - * - * @param dbName the database name - * @return {@code true} if the database was deleted, {@code false} otherwise - */ - public static boolean purgeDatabase(final String dbName) { - // TODO: Should we check if the database is booted / active? - synchronized (DATABASES) { - DataStore store = (DataStore)DATABASES.remove(dbName); - if (store != null) { - // Delete everything. - store.purge(); - return true; - } - return false; - } - } - /** The canonical (unique) name of the database (absolute path). */ private String canonicalName; /** The data directory of the database. */ @@ -329,7 +309,6 @@ public class VFMemoryStorageFactory */ public void sync(OutputStream stream, boolean metaData) { // Does nothing, data is stored only in memory. - // TODO: Are there any streams that needs to be flushed? } public boolean supportsWriteSync() { @@ -347,7 +326,7 @@ public class VFMemoryStorageFactory * @throws NullPointerException if {@code file} is {@code null} */ private String normalizePath(String dir, String file) { - if (dir == null || dir.equals("")) { + if (dir == null || dir.length() == 0) { dir = dataDirectory.getPath(); } else if (!new File(dir).isAbsolute()) { dir = new File(dataDirectory.getPath(), dir).getPath(); @@ -364,7 +343,7 @@ public class VFMemoryStorageFactory * @return A path. */ private String normalizePath(String path) { - if (path == null || path.equals("")) { + if (path == null || path.length() == 0) { return dataDirectory.getPath(); } else if (new File(path).isAbsolute()) { return path;