Looks good to me too

--alex

On 01.04.2016 20:37, Dan Rollo wrote:
+1

On Apr 1, 2016, at 11:57 AM, Sergey Bylokhov <[email protected]> wrote:

Hello,
Please review the trivial fix for jdk9.

We incorrectly tries to add the listener instead of removing it. It cannot 
caused a big memory leak because the second add is noop if the same listener 
was added already.

There is no test in the fix, because this code is not executed in current 
version of jdk. The JavaSoundAudioClip first tries to open the file(or stream) 
by the AudioSystem, then by the MidiSystem. But after the gervill integration 
AudioSystem is able to play the midi files(it is implemented in the 
SoftMidiAudioFileReader), so the MidiSystem is never checked and the 
JavaSoundAudioClip.sequencer is never initialized.

But I manually checked that if SoftMidiAudioFileReader is removed then the code 
is executed and the listener will be removed.

Bug: https://bugs.openjdk.java.net/browse/JDK-7076354
Webrev can be found at: http://cr.openjdk.java.net/~serb/7076354/webrev.00

--
Best regards, Sergey.

Reply via email to