Kristian Waagan <[EMAIL PROTECTED]> 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
