jdk/test/javax/sound/midi/Devices/InitializationHang.java
author serb
Wed, 18 Feb 2015 16:59:51 +0300
changeset 29258 adf046d51c1c
child 32307 7a3c84a74b56
permissions -rw-r--r--
8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before Reviewed-by: azvegint, prr
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
29258
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
     1
/*
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
     2
 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
     4
 *
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
     7
 * published by the Free Software Foundation.
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
     8
 *
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    13
 * accompanied this code).
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    14
 *
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    18
 *
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    21
 * questions.
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    22
 */
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    23
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    24
import java.awt.Toolkit;
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    25
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    26
import javax.sound.midi.MidiSystem;
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    27
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    28
/**
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    29
 * @test
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    30
 * @bug 8068412
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    31
 * @author Sergey Bylokhov
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    32
 */
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    33
public final class InitializationHang {
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    34
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    35
    public static void main(final String[] argv) throws Exception {
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    36
        MidiSystem.getReceiver();
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    37
        Toolkit.getDefaultToolkit();
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    38
    }
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    39
}
adf046d51c1c 8068412: [macosx] Initialization of Cocoa hangs if CoreAudio was initialized before
serb
parents:
diff changeset
    40