Re: Comment on bug JDK-8013586

2015-01-09 Thread Klaus Jaensch
Hi Dan, Am 09.01.2015 um 05:37 schrieb Dan Rollo: Even better, no need for the “catch/throw” chunk, because the method declares those caught exceptions: public AudioInputStream getAudioInputStream(File file) throws UnsupportedAudioFileException, IOException { final FileInputStrea

Re: Comment on bug JDK-8013586

2015-01-09 Thread Dan Rollo
Yikes, Good point Klaus! Forgot the caller wants to actually use a valid stream for the non-exceptional case. Would have to move the is.close() back into a catch clause. I’ll try to post a better one later. (Any unit tests of this sort of thing exist in the tree now? - if not, I could try a unit

Re: Comment on bug JDK-8013586

2015-01-09 Thread Florian Bomers
At the time, I've fixed the same type of bug in WaveFileReader and the likes. It was tracked under bug #4325421 and I *should* have written a unit test. If indeed, you should find it by looking for a unit test with that bug id. In WaveFileReader, I fixed it without a clumsy catch clause -- analog