Hello, This patch fixes a number of small bugs in the javax.sound implementation and makes its behavior closer to the openjdk one.
ChangeLog entries: * javax/sound/midi/MidiMessage.java (MidiMessage): Don't dereference "data" parameter if it is null. * javax/sound/midi/MidiMessage.java (setMessage): Check "length" parameter validity; allocate new byte array for "data" only if the previous one is null or not long enough. * javax/sound/midi/SysexMessage.java (setMessage): Likewise. * javax/sound/midi/MidiSystem.java (getMidiFileTypes): Defend against running out of "supported" array (which is of length 3). * javax/sound/midi/SysexMessage.java (setMessage): Zero-extend data[0] byte (into "status" local variable). * javax/sound/midi/SysexMessage.java (clone): Don't call arraycopy() if "data" is null. * javax/sound/sampled/CompoundControl.java (CompoundControl): Remove FIXME for cloning (match the RI behavior). * javax/sound/sampled/EnumControl.java (EnumControl): Likewise. * javax/sound/sampled/CompoundControl.java (getMemberControls): Do cloning of "memberControls" array. * javax/sound/sampled/EnumControl.java (getValues): Likewise. * javax/sound/sampled/EnumControl.java (setValue): Swap sides in equals() call (to match the RI); pass "value" to IllegalArgumentException constructor. * javax/sound/sampled/EnumControl.java (toString): Use getValue(). * javax/sound/sampled/Line.java (Info.klass): Make final; add generics. * javax/sound/sampled/Line.java (Info): If "klass" is null then use Line.class (to match the RI). * javax/sound/sampled/Line.java (Info.matches): Use isInstance() and isAssignableFrom() instead of equals() (to match the RI). * javax/sound/sampled/spi/FormatConversionProvider.java (isConversionSupported): Search for at least one "encodings" element matching "targ" (to match the RI).
classpath-ivmai-05.diff
Description: Binary data