-
CSR
-
Resolution: Approved
-
P3
-
None
-
minimal
-
Java API
-
SE
Summary
Most Java Sound methods and constructors do not specify the behavior when passing null as one or more of the arguments.
Solution
Java API's should, specify what can happens, if null is passed as argument.
Specification
src/java.desktop/share/classes/javax/sound/midi/package-info.java
+ * Please note: In the {@code javax.sound.midi} APIs, a {@code null} reference
+ * parameter to methods is incorrect unless explicitly documented on the method
+ * as having a meaningful interpretation. Usage to the contrary is incorrect
+ * coding and may result in a run time exception either immediately or at some
+ * later time. {@code NullPointerException} is an example of typical and
+ * acceptable run time exception for such cases.
*
* @since 1.3
*/
package javax.sound.midi;
.....
src/java.desktop/share/classes/javax/sound/midi/spi/package-info.java
+ * Please note: In the {@code javax.sound.midi.spi} APIs, a {@code null}
+ * reference parameter to methods is incorrect unless explicitly documented on
+ * the method as having a meaningful interpretation. Usage to the contrary is
+ * incorrect coding and may result in a run time exception either immediately or
+ * at some later time. {@code NullPointerException} is an example of typical and
+ * acceptable run time exception for such cases.
*
* @since 1.3
*/
package javax.sound.midi.spi;
....
src/java.desktop/share/classes/javax/sound/sampled/package-info.java
+ * Please note: In the {@code javax.sound.sampled} APIs, a {@code null}
+ * reference parameter to methods is incorrect unless explicitly documented on
+ * the method as having a meaningful interpretation. Usage to the contrary is
+ * incorrect coding and may result in a run time exception either immediately or
+ * at some later time. {@code NullPointerException} is an example of typical and
+ * acceptable run time exception for such cases.
*
* @since 1.3
*/
package javax.sound.sampled;
....
src/java.desktop/share/classes/javax/sound/sampled/spi/package-info.java
+ * Please note: In the {@code javax.sound.sampled.spi} APIs, a {@code null}
+ * reference parameter to methods is incorrect unless explicitly documented on
+ * the method as having a meaningful interpretation. Usage to the contrary is
+ * incorrect coding and may result in a run time exception either immediately or
+ * at some later time. {@code NullPointerException} is an example of typical and
+ * acceptable run time exception for such cases.
*
* @since 1.3
*/
package javax.sound.sampled.spi;
- csr of
-
JDK-4912693 Behavior of null arguments not specified in Java Sound
-
- Resolved
-