--- old/src/java.desktop/share/classes/com/sun/media/sound/MidiOutDeviceProvider.java 2016-08-12 17:01:54.000000000 +0300 +++ new/src/java.desktop/share/classes/com/sun/media/sound/MidiOutDeviceProvider.java 2016-08-12 17:01:54.000000000 +0300 @@ -27,7 +27,6 @@ import javax.sound.midi.MidiDevice; - /** * MIDI output 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. */ @@ -61,8 +56,7 @@ if (Printer.trace) Printer.trace("MidiOutDeviceProvider: constructor"); } - // implementation of abstract methods in AbstractMidiDeviceProvider - + @Override AbstractMidiDeviceProvider.Info createInfo(int index) { if (!enabled) { return null; @@ -70,6 +64,7 @@ return new MidiOutDeviceInfo(index, MidiOutDeviceProvider.class); } + @Override MidiDevice createDevice(AbstractMidiDeviceProvider.Info info) { if (enabled && (info instanceof MidiOutDeviceInfo)) { return new MidiOutDevice(info); @@ -77,6 +72,7 @@ return null; } + @Override int getNumDevices() { if (!enabled) { if (Printer.debug)Printer.debug("MidiOutDevice not enabled, returning 0 devices"); @@ -85,14 +81,15 @@ return nGetNumDevices(); } + @Override MidiDevice[] getDeviceCache() { return devices; } + @Override void setDeviceCache(MidiDevice[] devices) { MidiOutDeviceProvider.devices = devices; } + @Override Info[] getInfoCache() { return infos; } + @Override void setInfoCache(Info[] infos) { MidiOutDeviceProvider.infos = infos; } - - // INNER CLASSES - /** * Info class for MidiOutDevices. Adds the * provider's Class to keep the provider class from being @@ -113,9 +110,6 @@ } // class MidiOutDeviceInfo - - // NATIVE METHODS - private static native int nGetNumDevices(); private static native String nGetName(int index); private static native String nGetVendor(int index);