< prev index next >
test/javax/sound/midi/Devices/InitializationHang.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2015, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2015, 2017, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 22,41 ****
*/
import java.awt.Toolkit;
import javax.sound.midi.MidiSystem;
/**
* @test
* @bug 8068412
- * @key headful
- * @author Sergey Bylokhov
*/
public final class InitializationHang {
! public static void main(final String[] argv) throws Exception {
MidiSystem.getReceiver();
Toolkit.getDefaultToolkit();
}
}
--- 22,44 ----
*/
import java.awt.Toolkit;
import javax.sound.midi.MidiSystem;
+ import javax.sound.midi.MidiUnavailableException;
/**
* @test
* @bug 8068412
*/
public final class InitializationHang {
! public static void main(final String[] argv) {
! try {
MidiSystem.getReceiver();
Toolkit.getDefaultToolkit();
+ } catch (final MidiUnavailableException ignored) {
+ // the test is not applicable
+ }
}
}
< prev index next >