db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: svn commit: r542016 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4: BlobTest.java CallableStatementTest.java ClobTest.java DataSourceTest.java PreparedStatementTest.java ResultSetTest.java TestJDBC40Exception.java
Date Tue, 29 May 2007 07:38:23 GMT
Kristian Waagan <Kristian.Waagan@Sun.COM> writes:

> I was not thinking about prepareCall() returning null. I think the if
> was added because some people liked to do the cleaning up themselves,
> nullifying the reference in the test method. That's the NPE I was
> thinking about, but these things are probably best handled by code
> reviews (i.e. don't nullify references yourself).

I agree. Clean-up code belongs in tearDown(), not in the test method. If
someone nullified the statement in the test method, I guess they would
get NPE on the first run and fix it.

> The change is okay for me, was just wondering if there was something
> fishy with isClosed() so that it couldn't be trusted.

No, there's nothing fishy about isClosed(), but I don't think it's
necessary since close() is defined to be a no-op if the statement is
closed. And if close() fails on a closed object, I think it is OK that
the test fails too.

Knut Anders

View raw message