< prev index next >

src/java.desktop/share/classes/com/sun/media/sound/AbstractMidiDeviceProvider.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 23,36 **** * questions. */ package com.sun.media.sound; import javax.sound.midi.MidiDevice; import javax.sound.midi.spi.MidiDeviceProvider; - /** * Super class for MIDI input or output device provider. * * @author Florian Bomers */ --- 23,37 ---- * questions. */ package com.sun.media.sound; + import java.util.Objects; + import javax.sound.midi.MidiDevice; import javax.sound.midi.spi.MidiDeviceProvider; /** * Super class for MIDI input or output device provider. * * @author Florian Bomers */
*** 125,135 **** System.arraycopy(infos, 0, localArray, 0, infos.length); return localArray; } @Override ! public final MidiDevice getDevice(MidiDevice.Info info) { if (info instanceof Info) { readDeviceInfos(); MidiDevice[] devices = getDeviceCache(); Info[] infos = getInfoCache(); Info thisInfo = (Info) info; --- 126,137 ---- System.arraycopy(infos, 0, localArray, 0, infos.length); return localArray; } @Override ! public final MidiDevice getDevice(final MidiDevice.Info info) { ! Objects.requireNonNull(info); if (info instanceof Info) { readDeviceInfos(); MidiDevice[] devices = getDeviceCache(); Info[] infos = getInfoCache(); Info thisInfo = (Info) info;
< prev index next >