Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 7543 invoked from network); 10 Nov 2006 19:18:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Nov 2006 19:18:27 -0000 Received: (qmail 34056 invoked by uid 500); 10 Nov 2006 19:18:38 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 33990 invoked by uid 500); 10 Nov 2006 19:18:37 -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 33979 invoked by uid 99); 10 Nov 2006 19:18:37 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Nov 2006 11:18:37 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of m.v.lunteren@gmail.com designates 66.249.92.172 as permitted sender) Received: from [66.249.92.172] (HELO ug-out-1314.google.com) (66.249.92.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Nov 2006 11:18:24 -0800 Received: by ug-out-1314.google.com with SMTP id o2so639178uge for ; Fri, 10 Nov 2006 11:18:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tFsiWMglkAky7d4Ip06HOuMtNBUZK5MzkdBIaTjO+iueY7y2xZB4T1RcHDTu3JjiGGM12sEQCX8HDIpOGjzbKFXtOaPQIWQMUoobNMX8oHuT65EYgLkwvsFy/vPO0FQKMwPaguyUR0eKD4BGo+2Vb2zXpkXtehjBrDJAVk7hHi0= Received: by 10.78.160.2 with SMTP id i2mr2941027hue.1163186282004; Fri, 10 Nov 2006 11:18:02 -0800 (PST) Received: by 10.78.186.8 with HTTP; Fri, 10 Nov 2006 11:18:01 -0800 (PST) Message-ID: Date: Fri, 10 Nov 2006 11:18:01 -0800 From: "Myrna van Lunteren" To: "Derby Development" Subject: Re: svn commit: r473416 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JarUtil.java Cc: derby-commits@db.apache.org In-Reply-To: <20061110183051.0D4901A9846@eris.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061110183051.0D4901A9846@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org On 11/10/06, djd@apache.org wrote: > Author: djd > Date: Fri Nov 10 10:30:50 2006 > New Revision: 473416 > > URL: http://svn.apache.org/viewvc?view=rev&rev=473416 > Log: > DERBY-537 (partial) Cleanup JarUtil removing code that is never called and making class package private. > > Modified: > db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JarUtil.java > > Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JarUtil.java > URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JarUtil.java?view=diff&rev=473416&r1=473415&r2=473416 > ============================================================================== > --- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JarUtil.java (original) > +++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JarUtil.java Fri Nov 10 10:30:50 2006 > @@ -48,12 +48,8 @@ > import java.sql.Connection; > import java.sql.SQLException; > > -public class JarUtil > +class JarUtil > { > - public static final String ADD_JAR_DDL = "ADD JAR"; > - public static final String DROP_JAR_DDL = "DROP JAR"; > - public static final String REPLACE_JAR_DDL = "REPLACE JAR"; > - public static final String READ_JAR = "READ JAR"; > // > //State passed in by the caller > private UUID id; //For add null means create a new id. > @@ -68,7 +64,7 @@ > > // > //State derived from the caller's context > - public JarUtil(UUID id, String schemaName, String sqlName) > + private JarUtil(UUID id, String schemaName, String sqlName) > throws StandardException > { > this.id = id; > @@ -93,7 +89,7 @@ > > @exception StandardException Opps > */ > - static public long > + static long > add(UUID id, String schemaName, String sqlName, String externalPath) > throws StandardException > { > @@ -121,7 +117,7 @@ > @param is A stream for reading the content of the file to add. > @exception StandardException Opps > */ > - public long add(InputStream is) throws StandardException > + private long add(InputStream is) throws StandardException > { > // > //Like create table we say we are writing before we read the dd > @@ -160,7 +156,7 @@ > > @exception StandardException Opps > */ > - static public void > + static void > drop(UUID id, String schemaName, String sqlName,boolean purgeOnCommit) > throws StandardException > { > @@ -179,7 +175,7 @@ > > @exception StandardException Opps > */ > - public void drop(boolean purgeOnCommit) throws StandardException > + private void drop(boolean purgeOnCommit) throws StandardException > { > // > //Like create table we say we are writing before we read the dd > @@ -249,7 +245,7 @@ > > @exception StandardException Opps > */ > - static public long > + static long > replace(UUID id,String schemaName, String sqlName, > String externalPath,boolean purgeOnCommit) > throws StandardException > @@ -283,7 +279,7 @@ > means leave it around for use by replication. > @exception StandardException Opps > */ > - public long replace(InputStream is,boolean purgeOnCommit) throws StandardException > + private long replace(InputStream is,boolean purgeOnCommit) throws StandardException > { > // > //Like create table we say we are writing before we read the dd > @@ -333,22 +329,6 @@ > } > > /** > - Get the FileInfoDescriptor for a jar file from the current connection's database or > - null if it does not exist. > - > - @param schemaName the name for the schema that holds the jar file. > - @param sqlName the sql name for the jar file. > - @return The FileInfoDescriptor. > - @exception StandardException Opps > - */ > - public static FileInfoDescriptor getInfo(String schemaName, String sqlName, String statementType) > - throws StandardException > - { > - JarUtil jUtil = new JarUtil(null,schemaName,sqlName); > - return jUtil.getInfo(); > - } > - > - /** > Get the FileInfoDescriptor for the Jar file or null if it does not exist. > @exception StandardException Ooops > */ > @@ -357,44 +337,6 @@ > { > SchemaDescriptor sd = dd.getSchemaDescriptor(schemaName, null, true); > return dd.getFileInfoDescriptor(sd,sqlName); > - } > - > - // get the current version of the jar file as a File or InputStream > - public static Object getAsObject(String schemaName, String sqlName) > - throws StandardException > - { > - JarUtil jUtil = new JarUtil(null,schemaName,sqlName); > - > - FileInfoDescriptor fid = jUtil.getInfo(); > - if (fid == null) > - throw StandardException.newException(SQLState.LANG_FILE_DOES_NOT_EXIST, sqlName,schemaName); > - > - long generationId = fid.getGenerationId(); > - > - StorageFile f = jUtil.getAsFile(generationId); > - if (f != null) > - return f; > - > - return jUtil.getAsStream(generationId); > - } > - > - private StorageFile getAsFile(long generationId) { > - return fr.getAsFile(JarDDL.mkExternalName(schemaName, sqlName, fr.getSeparatorChar()), generationId); > - } > - > - public static InputStream getAsStream(String schemaName, String sqlName, > - long generationId) throws StandardException { > - JarUtil jUtil = new JarUtil(null,schemaName,sqlName); > - > - return jUtil.getAsStream(generationId); > - } > - > - private InputStream getAsStream(long generationId) throws StandardException { > - try { > - return fr.getAsStream(JarDDL.mkExternalName(schemaName, sqlName, fr.getSeparatorChar()), generationId); > - } catch (IOException ioe) { > - throw StandardException.newException(SQLState.LANG_FILE_ERROR, ioe, ioe.toString()); > - } > } > > private void notifyLoader(boolean reload) throws StandardException { > > > Dan, I think this may be causing a build error for me: compile_impl_services_169: [javac] Compiling 52 source files to C:\derbyt\svn2\trunk\classes [javac] C:\derbyt\svn2\trunk\java\engine\org\apache\derby\impl\services\reflect\JarLoader.java:24: org.apache.derby.impl.sql.execute.JarUtil is not public in org.apache.derby.impl.sql.execute; cannot be accessed from outside package [javac] import org.apache.derby.impl.sql.execute.JarUtil; [javac] ^ [javac] 1 error [javac] Compile failed; see the compiler error output for details. compile_impl_io_169: compile: compile_impl_services_169: [javac] Compiling 52 source files to C:\derbyt\svn2\trunk\classes [javac] C:\derbyt\svn2\trunk\java\engine\org\apache\derby\impl\services\reflect\JarLoader.java:24: org.apache.derby.impl.sql.execute.JarUtil is not public in org.apache.derby.impl.sql.execute; cannot be accessed from outside package [javac] import org.apache.derby.impl.sql.execute.JarUtil; [javac] ^ [javac] 1 error [javac] Compile failed; see the compiler error output for details. Or am I missing something? Thx, Myrna