--- old/src/java.desktop/share/classes/com/sun/media/sound/MidiInDeviceProvider.java 2016-08-12 17:01:53.000000000 +0300 +++ new/src/java.desktop/share/classes/com/sun/media/sound/MidiInDeviceProvider.java 2016-08-12 17:01:53.000000000 +0300 @@ -27,7 +27,6 @@ import javax.sound.midi.MidiDevice; - /** * MIDI input device provider. * @@ -44,16 +43,12 @@ private static final boolean enabled; - // STATIC - static { // initialize Platform.initialize(); enabled = Platform.isMidiIOEnabled(); } - // CONSTRUCTOR - /** * Required public no-arg constructor. */ @@ -63,6 +58,7 @@ // implementation of abstract methods in AbstractMidiDeviceProvider + @Override AbstractMidiDeviceProvider.Info createInfo(int index) { if (!enabled) { return null; @@ -70,6 +66,7 @@ return new MidiInDeviceInfo(index, MidiInDeviceProvider.class); } + @Override MidiDevice createDevice(AbstractMidiDeviceProvider.Info info) { if (enabled && (info instanceof MidiInDeviceInfo)) { return new MidiInDevice(info); @@ -77,6 +74,7 @@ return null; } + @Override int getNumDevices() { if (!enabled) { if (Printer.debug)Printer.debug("MidiInDevice not enabled, returning 0 devices"); @@ -87,14 +85,15 @@ return numDevices; } + @Override MidiDevice[] getDeviceCache() { return devices; } + @Override void setDeviceCache(MidiDevice[] devices) { MidiInDeviceProvider.devices = devices; } + @Override Info[] getInfoCache() { return infos; } + @Override void setInfoCache(Info[] infos) { MidiInDeviceProvider.infos = infos; } - - // INNER CLASSES - /** * Info class for MidiInDevices. Adds the * provider's Class to keep the provider class from being @@ -115,9 +114,6 @@ } // class MidiInDeviceInfo - - // NATIVE METHODS - private static native int nGetNumDevices(); private static native String nGetName(int index); private static native String nGetVendor(int index);