Hi Stuart On Apr 21, 2014, at 9:26 PM, Stuart Marks <[email protected]> wrote:
> > > On 4/21/14 1:58 PM, Lance Andersen wrote: >> Need a reviewer for some additional updates of the SQLException tests I >> pushed on Friday so that they play nicer WRT clean up on windows with some >> tools. >> >> Did some minor refactoring as part of this to address some of Roger's >> earlier comments seeing I had to touch the tests. >> >> The webrev is at http://cr.openjdk.java.net/~lancea/8041331/webrev.00/ > > Hi Lance, > > Thanks for pointing me at this webrev. :-) > > Extracting all the serialization/deserialization code into a helper method > createSerializedException() makes good sense. Nice use of generics, too. Thank you. > > I'd go farther and avoid creating a file in the first place. You can > serialize to a ByteArrayOutputStream, extract the byte array, and deserialize > from that. It's probably necessary to flush between serialization and > deserialization. This avoids having to do any file cleanup at all. (The > IOExceptions still have to be handled or declared, though.) Roger had suggested it earlier and thought I would leave it but obviously it was the wrong choice :-) I have switched this to use a byte array vs file IO > > You could go back and remove the fname argument from all callers, or you > could leave it in as a label to use in messages if any error occurs in this > routine. removed the extra argument, netbeans was my friend here ;-) > > One tiny nitpick, at SQLNonTransientConnectionExceptionTests.java line 170, > an extra semicolon was inserted. Thanks for catching that, fixed The revised webrev is at http://cr.openjdk.java.net/~lancea/8041331/webrev.01/ Best Lance > > Thanks, > > s'marks > Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037 Oracle Java Engineering 1 Network Drive Burlington, MA 01803 [email protected]
