JDK-4934158 : DOC: clean up MidiDevice documentation
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: 5.0
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2003-10-08
  • Updated: 2017-05-16
  • Resolved: 2003-10-24
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 b26Fixed
Description
The documentation of the class javax.sound.midi.MidiDevice contains at least one obsolete and confusing comment. This should be remove. Other issues should be explained more detailled.

- (class description:) "To this end, it
 * typically also implements the <code>{@link Transmitter}</code> or
 * <code>{@link Receiver}</code> interface (or both), or has access to objects that do."
MidiDevices do not implement the interfaces Transmitter and Receiver. The wording should be changed to something like this: "A <code>MidiDevice</code>
 * can be a transmitter or a receiver of MIDI events, or both. Therefore, it
 * can provide <code>{@link Transmitter}</code> or
 * <code>{@link Receiver}</code> instances (or both). Typically, MIDI IN ports provide Transmitters, MIDI OUT ports and Synthesizers provide Receivers. Sequencers typically provide Transmitters for playback and Receivers for recording."

- for newcomers, it is not obvious how to detect if a MidiDevice represents a hardware MIDI port. The usual code snippet used for this (below) should be included in the documentation.
---
MidiDevice device = ...;
if ( ! (device instanceof Sequencer) && ! (device instanceof Synthesizer)) {
    // we're now sure that device represents a MIDI port
    // ...
}
---

- obsolete and commented out code (ThruTransmitter) should be removed.

###@###.### 2003-10-22
Checked in Bug Fix

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

PUBLIC COMMENTS DOC: clean up MidiDevice documentation
10-06-2004

EVALUATION ###@###.### 2003-10-08 Should be done. CCC is required.
08-10-2003