7009127: [Spec clarification request] Wrapping the devices retrieved from MidiDeviceProvider
authoramenkov
Wed, 06 Apr 2011 15:07:23 +0400
changeset 9214 237acaa608d5
parent 9213 856f16c729a5
child 9215 cab45ca6ab44
7009127: [Spec clarification request] Wrapping the devices retrieved from MidiDeviceProvider Reviewed-by: alexp
jdk/src/share/classes/javax/sound/midi/MidiSystem.java
--- a/jdk/src/share/classes/javax/sound/midi/MidiSystem.java	Wed Apr 06 12:05:38 2011 +0400
+++ b/jdk/src/share/classes/javax/sound/midi/MidiSystem.java	Wed Apr 06 15:07:23 2011 +0400
@@ -239,6 +239,12 @@
      * If a suitable MIDI port is not available, the Receiver is
      * retrieved from an installed synthesizer.
      *
+     * <p>If a native receiver provided by the default device does not implement
+     * the {@code MidiDeviceReceiver} interface, it will be wrapped in a
+     * wrapper class that implements the {@code MidiDeviceReceiver} interface.
+     * The corresponding {@code Receiver} method calls will be forwarded
+     * to the native receiver.
+     *
      * <p>If this method returns successfully, the {@link
      * javax.sound.midi.MidiDevice MidiDevice} the
      * <code>Receiver</code> belongs to is opened implicitly, if it is
@@ -284,7 +290,13 @@
      * it is used to identify the device that provides the default transmitter.
      * For details, refer to the {@link MidiSystem class description}.
      *
-     * If this method returns successfully, the {@link
+     * <p>If a native transmitter provided by the default device does not implement
+     * the {@code MidiDeviceTransmitter} interface, it will be wrapped in a
+     * wrapper class that implements the {@code MidiDeviceTransmitter} interface.
+     * The corresponding {@code Transmitter} method calls will be forwarded
+     * to the native transmitter.
+     *
+     * <p>If this method returns successfully, the {@link
      * javax.sound.midi.MidiDevice MidiDevice} the
      * <code>Transmitter</code> belongs to is opened implicitly, if it
      * is not already open. It is possible to close an implicitly