-
Bug
-
Resolution: Won't Fix
-
P2
-
7
-
generic
-
generic
PRECONDITION
1. A MidiDevice providing the default Receiver (or Transmitter) is supplied via the service provider interface (using javax.sound.midi.spi.MidiDeviceProvider).
2. The Receiver (or Transmitter) does not implement MidiDeviceReceiver (or MidiDeviceTransmitter).
3. The Receiver (or Transmitter) implementation overrides methods from java.lang.Object.
PROBLEM
System.setProperty("javax.sound.midi.Receiver", /* Our receiver */);
Receiver receiver = MidiSystem.getReceiver();
// THESE METHODS ARE NOT INVOKED FROM THE RECEIVER IMPLEMENTATION!
receiver.toString();
receiver.equals();
receiver./* Any other method from java.lang.Object */
INITIAL ANALYSIS
From the RI code:
public static Receiver getReceiver() throws MidiUnavailableException {
// . . .
if (!(receiver instanceof MidiDeviceReceiver)) {
receiver = new MidiDeviceReceiverEnvelope(device, receiver);
}
return receiver;
}
It looks like MidiDeviceReceiverEnvelope does not forward java.lang.Object methods to veritable receiver.
1. A MidiDevice providing the default Receiver (or Transmitter) is supplied via the service provider interface (using javax.sound.midi.spi.MidiDeviceProvider).
2. The Receiver (or Transmitter) does not implement MidiDeviceReceiver (or MidiDeviceTransmitter).
3. The Receiver (or Transmitter) implementation overrides methods from java.lang.Object.
PROBLEM
System.setProperty("javax.sound.midi.Receiver", /* Our receiver */);
Receiver receiver = MidiSystem.getReceiver();
// THESE METHODS ARE NOT INVOKED FROM THE RECEIVER IMPLEMENTATION!
receiver.toString();
receiver.equals();
receiver./* Any other method from java.lang.Object */
INITIAL ANALYSIS
From the RI code:
public static Receiver getReceiver() throws MidiUnavailableException {
// . . .
if (!(receiver instanceof MidiDeviceReceiver)) {
receiver = new MidiDeviceReceiverEnvelope(device, receiver);
}
return receiver;
}
It looks like MidiDeviceReceiverEnvelope does not forward java.lang.Object methods to veritable receiver.
- relates to
-
JDK-4933700 RFE: Add way to get device from Receiver and Transmitter
-
- Closed
-
-
JDK-7009127 [Spec clarification request] Wrapping the devices retrieved from MidiDeviceProvider
-
- Closed
-