[ 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