-
Bug
-
Resolution: Future Project
-
P4
-
None
-
5.0
-
generic
-
generic
For the class javax.sound.midi.MidiDevice, the specification of the methods getReceiver() and getTransmitter() specifies throwing a MidiUnavailableException in case a receiver/transmitter "is not available due to resource restrictions". However, the specification does not state clearly the behaviour iftransmitters/receivers aren't supported by the device at all. "Not supported at all" is definitely different from "resource restriction". An application program can find out if receivers/transmitters are available at all by calling getMaxReceivers()/getMaxTransmitters(). So getTransmitter()/getReceiver() should rather throw an IllegalArgumentException than a MidiUnavailableException for the case that Receivers/Transmitters aren't supported.