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: 4916909
Votes 0
Synopsis SPEC: MidiDevice should specify open/close behaviour precisely
Category java:classes_sound
Reported Against tiger
Release Fixed 1.5(tiger-b28)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs 4945307
Submit Date 03-SEP-2003
Description
SPEC: MidiDevice should specify open/close behaviour preciselyFor the class javax.sound.midi.MidiDevice, the behaviour on calls to open() and close() is not specified if used in combination with getReceiver(), getTransmitter, Receiver.close(), Transmitter.close(), MidiSystem.getReceiver() and MidiSystem.getTransmitter().

The specification should tell:
- MidiSystem.getReceiver() and MidiSystem.getTransmitter() open the underlying device implicitly.

- Receivers/Transmitters retrieved via MidiSystem close the underlying device implicitly if their close() method is called and the device hasn't been opened explicitly. If more than one Transmitter or Receiver (that implicitly opened the device) are open, the device is closed after the last Receiver or Transmitter has been closed (and the device hasn't been opened explicitly).

- Receivers and Transmitters retrieved via the device's getReceiver() and getTransmitter() methods do not open the underlying device implicitly. Closing such Receivers or Transmitters does not close the device implicitly. This is true even if there are Receivers or Transmitters for the same device that opened the device implicitly.

- a call to the device's open() method explicitly openes the device. After such a call, the device stays open even if all Transmitters or Receivers has been closed. (The only way to close a device after an explicit call to open() is an explicit call to close().)

- a call to the device's close() method closes all Transmitters and Receivers related to this device, then closes the device itself. This behaviour is independend on wether the Transmitters and Receivers opened the device implicitly or not. Furthermore, it is independant on wether the device has been opened explicitly via open().

 xxxxx@xxxxx  2003-11-03
checked in fix
Work Around
N/A
Evaluation
 xxxxx@xxxxx  2003-09-03
Valid request. No coding work required.
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang