--- old/src/java.desktop/share/classes/com/sun/media/sound/EventDispatcher.java 2018-07-09 14:18:56.000000000 +0300 +++ new/src/java.desktop/share/classes/com/sun/media/sound/EventDispatcher.java 2018-07-09 14:18:56.000000000 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -308,7 +308,12 @@ * called from auto-closing clips when their closed() method is called. */ void autoClosingClipClosed(AutoClosingClip clip) { - // nothing to do -- is removed from arraylist above + synchronized(autoClosingClips) { + int index = getAutoClosingClipIndex(clip); + if (index != -1) { + autoClosingClips.remove(index); + } + } }