Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 6941 invoked from network); 27 Jun 2006 19:23:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Jun 2006 19:23:10 -0000 Received: (qmail 59499 invoked by uid 500); 27 Jun 2006 19:23:08 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 59392 invoked by uid 500); 27 Jun 2006 19:23:07 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 59332 invoked by uid 99); 27 Jun 2006 19:23:07 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jun 2006 12:23:07 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jun 2006 12:23:06 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 764047141F9 for ; Tue, 27 Jun 2006 19:21:32 +0000 (GMT) Message-ID: <8036420.1151436092481.JavaMail.jira@brutus> Date: Tue, 27 Jun 2006 19:21:32 +0000 (GMT+00:00) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-1445) Add new streaming overloads and modify some existing ones. In-Reply-To: <2377902.1151055089838.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-1445?page=all ] Knut Anders Hatlen updated DERBY-1445: -------------------------------------- Attachment: ver3-washed.diff The ver2 and ver3 patches reformatted large portions of otherwise unmodified code. This makes it rather difficult to see what has been changed by the patch, and it increases the probability of conflicts with others working in this area of the code. Also, there were still some methods that were indented more than the surrounding code. I took the liberty of washing the formatting changes and incorrect indentation out of the patch before reviewing and committing it. The washed patch (based on ver3) is attached as ver3-washed.diff. It was committed into trunk with revision 417548. With this commit, the four jdbc40 tests that have been failing the last weeks now run cleanly. Thank you Narayanan! I still see two issues with the patch, and it would be great if you could address them in a follow-up patch. 1) CallableStatementTest: testSetCharacterStream, testSetAsciiStream and testSetBinaryStream only fail if an exception is thrown that is not SQLFeatureNotSupportedException. They should also fail if no exception is thrown. 2) (This one is a minor issue which you can ignore if you want.) I agree with Kristian's earlier review comment that "there is no need to catch exceptions in JUnit tests when you don't take corrective actions." That is, instead of writing try { doSomething(); } catch (SomeKindOfException e) { fail("Failed " + e.getMessage()); } you could just declare the test method as "throws Exception" and skip try/catch/fail. It is simpler, and you also lose less information in the case of a failure (you preserve the stack trace, and possibly "caused by..."). The try/catch/fail pattern is used in PreparedStatementTest (testSetCharacterStream, testSetAsciiStream, testSetBinaryStream) and ResultSetTest (testUpdateBinaryStream, testUpdateAsciiStream, testUpdateCharacterStream, testUpdateBinaryStreamStringParameterName, testUpdateAsciiStreamStringParameterName, testUpdateCharacterStreamStringParameterName, embeddedUpdateClob, embeddedUpdateClobStringParameterName, embeddedUpdateBlob, embeddedUpdateBlobStringParameterName). Thanks! > Add new streaming overloads and modify some existing ones. > ----------------------------------------------------------- > > Key: DERBY-1445 > URL: http://issues.apache.org/jira/browse/DERBY-1445 > Project: Derby > Type: New Feature > Components: JDBC > Reporter: V.Narayanan > Assignee: V.Narayanan > Attachments: JDBC40_long_length_overloads.diff, JDBC40_long_length_overloads.stat, JDBC40_long_length_overloads_ver2.diff, JDBC40_long_length_overloads_ver2.stat, JDBC40_long_length_overloads_ver3.diff, JDBC40_long_length_overloads_ver3.stat, ver3-washed.diff > > The task involves Adding and modifying the following methods, which were recently added by the JDBC4 expert group and which appeared in Mustang build 86: > add PreparedStatement.setAsciiStream (int columnIndex, InputStream x, long length) > add PreparedStatement.setBinaryStream (int columnIndex, InputStream x, long length > add PreparedStatement.setCharacterStream (int columnIndex, Reader x, long length) > add CallableStatement.setAsciiStream (String columnName, InputStream x, long length) > add CallableStatement.setBinaryStream (String columnName, InputStream x, long length) > add CallableStatement.setCharacterStream (String columnName, Reader x, long length) > add ResultSet.updateAsciiStream (int columnIndex, InputStream x, long length) > add ResultSet.updateBinaryStream (int columnIndex, InputStream x, long length) > add ResultSet.updateCharacterStream (int columnIndex, Reader x, long length) > add ResultSet.updateAsciiStream (String columnName, InputStream x, long length) > add ResultSet.updateBinaryStream (String columnName, InputStream x, long length) > add ResultSet.updateCharacterStream (String columnName, Reader x, long length) > add ResultSet.updateBlob (int columnIndex, InputStream x, long length) > add ResultSet.updateBlob (String columnName, InputStream x, long length) > add ResultSet.updateClob (int columnIndex, Reader x, long length) > add ResultSet.updateClob (String columnName, Reader x, long length) > add ResultSet.updateNClob (int columnIndex, Reader x, long length) > add ResultSet.updateNClob (String columnName, Reader x, long length) > modify ResultSet.updateNCharacterStream(int columnIndex, Reader x, int length) to ResultSet.updateNCharacterStream(int columnIndex, Reader x, long > length) > modify ResultSet.updateNCharacterStream(String columnName, Reader x, int length) to ResultSet.updateNCharacterStream(String columnName, > Reader x, long length) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira