Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4912894

SPEC: MidiSystem.getSequencer() etc. should not throw IAE

XMLWordPrintable

    • b26
    • generic
    • generic

      For the following methods, the documentation does not specify the behaviour if there is no instance of a device of the respective category available at all in the system:
      javax.sound.midi.MidiSystem.getSequencer()
      javax.sound.midi.MidiSystem.getSynthesizer()
      javax.sound.midi.MidiSystem.getTransmitter()
      javax.sound.midi.MidiSystem.getReceiver()
      The current behaviour of the implementation is to throw an IllegalArgumentException. This behaviour seems appropriate, since the user can find out the installed devices with MidiSystem.getMidiDeviceInfo(). Furthermore, the behaviour is consistent with MidiSystem.getDevice(), which does specify the IllegalArgumentException (if the passed info object doesn't match any device). Therefore, for the methods named above, IllegalArgumentException should be added to the documentation.

            duke J. Duke
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: