--- old/src/java.desktop/share/classes/javax/sound/midi/spi/MidiDeviceProvider.java 2015-11-27 15:25:47.000000000 +0300 +++ new/src/java.desktop/share/classes/javax/sound/midi/spi/MidiDeviceProvider.java 2015-11-27 15:25:47.000000000 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -26,6 +26,7 @@ package javax.sound.midi.spi; import java.util.Arrays; +import java.util.Objects; import javax.sound.midi.MidiDevice; @@ -46,8 +47,10 @@ * is queried * @return {@code true} if the specified device is supported, otherwise * {@code false} + * @throws NullPointerException if {@code info} is {@code null} */ public boolean isDeviceSupported(final MidiDevice.Info info) { + Objects.requireNonNull(info); return Arrays.asList(getDeviceInfo()).contains(info); } @@ -67,6 +70,7 @@ * @throws IllegalArgumentException if the info object specified does not * match the info object for a device supported by this * {@code MidiDeviceProvider} + * @throws NullPointerException if {@code info} is {@code null} */ public abstract MidiDevice getDevice(MidiDevice.Info info); }