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

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

    Details

    • Subcomponent:
    • Resolved In Build:
      b26
    • CPU:
      generic
    • OS:
      generic

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                duke J. Duke (Inactive)
                Reporter:
                duke J. Duke (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: