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 E081F9E53 for ; Tue, 22 Nov 2011 11:45:34 +0000 (UTC) Received: (qmail 4937 invoked by uid 500); 22 Nov 2011 11:45:34 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 4894 invoked by uid 500); 22 Nov 2011 11:45:34 -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 4887 invoked by uid 99); 22 Nov 2011 11:45:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2011 11:45:34 +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; Tue, 22 Nov 2011 11:45:30 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 77BF82388860; Tue, 22 Nov 2011 11:45:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1204934 - in /db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc: BrokeredCallableStatement40.java BrokeredPreparedStatement40.java BrokeredStatement.java BrokeredStatement40.java EngineStatement.java Date: Tue, 22 Nov 2011 11:45:08 -0000 To: derby-commits@db.apache.org From: kahatlen@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111122114509.77BF82388860@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kahatlen Date: Tue Nov 22 11:45:07 2011 New Revision: 1204934 URL: http://svn.apache.org/viewvc?rev=1204934&view=rev Log: DERBY-4845: Improve the dependency tracking for our build targets Get rid of a call to Util.notImplemented() from BrokeredStatement by pulling the isClosed() method up from BrokeredStatement40, BrokeredPreparedStatement40 and BrokeredCallableStatement40 to their common super-class. Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement40.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement40.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.java?rev=1204934&r1=1204933&r2=1204934&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.java Tue Nov 22 11:45:07 2011 @@ -283,17 +283,6 @@ public class BrokeredCallableStatement40 } /** - * Checks if the statement is closed. - * - * @return true if the statement is closed, - * false otherwise - * @exception SQLException if an error occurs - */ - public final boolean isClosed() throws SQLException { - return getCallableStatement().isClosed(); - } - - /** * Returns this if this class implements the interface * * @param interfaces a Class defining an interface Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement40.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement40.java?rev=1204934&r1=1204933&r2=1204934&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement40.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement40.java Tue Nov 22 11:45:07 2011 @@ -82,17 +82,6 @@ public class BrokeredPreparedStatement40 } /** - * Checks if the statement is closed. - * - * @return true if the statement is closed, - * false otherwise - * @exception SQLException if an error occurs - */ - public final boolean isClosed() throws SQLException { - return getPreparedStatement().isClosed(); - } - - /** * Returns this if this class implements the interface * * @param interfaces a Class defining an interface Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java?rev=1204934&r1=1204933&r2=1204934&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java Tue Nov 22 11:45:07 2011 @@ -21,12 +21,8 @@ package org.apache.derby.iapi.jdbc; -import org.apache.derby.iapi.reference.JDBC30Translation; import org.apache.derby.iapi.reference.SQLState; -import org.apache.derby.iapi.error.StandardException; -import org.apache.derby.iapi.error.PublicAPI; -import org.apache.derby.iapi.services.info.JVMInfo; import org.apache.derby.impl.jdbc.Util; import java.sql.Connection; @@ -35,8 +31,6 @@ import java.sql.SQLException; import java.sql.SQLWarning; import java.sql.Statement; -import java.lang.reflect.*; - /** A Statement implementation that forwards all of its requests to an underlying Statement. */ @@ -552,21 +546,14 @@ public class BrokeredStatement implement } /** - * Checks if the statement is closed. Not implemented for this - * class since isClosed() is a new method in JDBC - * 4.0. The JDBC 4.0 sub-classes should override this method. + * Checks if the statement is closed. * * @return true if the statement is closed, * false otherwise - * @exception SQLException not-implemented exception + * @exception SQLException if an error occurs */ - protected boolean isClosed() throws SQLException { - // Not implemented since we cannot forward the call to a JDBC - // 4.0 method from this class. This dummy implementation is - // provided here so that checkIfClosed() can be implemented - // once in this class instead of once in each of the - // Brokered*Statement40 classes. - throw Util.notImplemented(); + public final boolean isClosed() throws SQLException { + return ((EngineStatement) getStatement()).isClosed(); } /** Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement40.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement40.java?rev=1204934&r1=1204933&r2=1204934&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement40.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement40.java Tue Nov 22 11:45:07 2011 @@ -41,17 +41,6 @@ public class BrokeredStatement40 extends } /** - * Checks if the statement is closed. - * - * @return true if the statement is closed, - * false otherwise - * @exception SQLException if an error occurs - */ - public final boolean isClosed() throws SQLException { - return getStatement().isClosed(); - } - - /** * Returns this if this class implements the interface * * @param interfaces a Class defining an interface Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java?rev=1204934&r1=1204933&r2=1204934&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java Tue Nov 22 11:45:07 2011 @@ -46,6 +46,11 @@ public interface EngineStatement extends * @see java.sql.Statement#getResultSetHoldability() */ public int getResultSetHoldability() throws SQLException; + + /** + * Identical to the JDBC 4 isClosed() method. + */ + public boolean isClosed() throws SQLException; //////////////////////////////////////////////////////////////////// //