JDK-4916909 : SPEC: MidiDevice should specify open/close behaviour precisely
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: 5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2003-09-03
  • Updated: 2017-05-16
  • Resolved: 2003-11-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b28Fixed
Description
For 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().

###@###.### 2003-11-03
checked in fix

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger tiger-beta FIXED IN: tiger-beta INTEGRATED IN: tiger-b28 tiger-beta
14-06-2004

PUBLIC COMMENTS SPEC: MidiDevice should specify open/close behaviour precisely
10-06-2004

EVALUATION ###@###.### 2003-09-03 Valid request. No coding work required.
03-09-2003