<Sound Dev>  Review Request: 7076354 JavaSoundAudioClip stop() Method sequencer.addMetaEventListener(this); wrong?
alexey.menkov at oracle.com
Mon Apr 4 09:17:17 UTC 2016
Looks good to me too
On 01.04.2016 20:37, Dan Rollo wrote:
>> On Apr 1, 2016, at 11:57 AM, Sergey Bylokhov <Sergey.Bylokhov at oracle.com> wrote:
>> 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.
More information about the sound-dev