Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4912894
Votes 0
Synopsis SPEC: MidiSystem.getSequencer() etc. should not throw IAE
Category java:classes_sound
Reported Against tiger
Release Fixed 1.5(tiger-b26)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs 4932838
Submit Date 26-AUG-2003
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  customer  doesn't match any device). Therefore, for the methods named above, IllegalArgumentException should be added to the documentation.
Work Around
N/A
Evaluation
  xxxxx@xxxxx   2003-08-26
Indeed, the requested clearification seems appropriate.

  xxxxx@xxxxx   2003-10-15
We agreed with JCK that throwing an IAE is not a good idea, because it would break compatibility. Instead, we will throw a MidiUnavailableException, which is already declared.


Edited synopsis: this bug became a spec bug after the implementation is fixed along with bug 4932838.
  xxxxx@xxxxx   2003-10-23
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang