JDK-4798000 : SPEC: LineEvent: unspecified IllegalArgumentException
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: 1.4.2,7
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2002-12-26
  • Updated: 2003-11-07
  • Resolved: 2003-11-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
5.0 b28Fixed
Related Reports
Relates :  
Name: dkR10031			Date: 12/26/2002

The current reference implementation (JDK 1.4.2beta, build b11)   
of the javax.sound.sampled.LineEvent.LineEvent(Line line, 
LineEvent.Type type, long position) throws unspecified 
------------------ example code begin --------------------------
import javax.sound.sampled.LineEvent;

public class MyLineEvent{
    public static void main(String args[]){
        try {
            LineEvent le = new LineEvent(null, null, 10l);
        } catch (Exception e){
            System.out.println("Exception: " + e);
------------------ example code end ----------------------------
------------------ log begin -----------------------------------
bash-2.03$ uname -a
SunOS novo101 5.8 Generic_108528-16 sun4u sparc SUNW,Ultra-1
bash-2.03$ /export/ld25/java/dest/jdk1.4.2-b11/solaris-sparc/bin/java -showversion MyLineEvent
java version "1.4.2-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b11)
Java HotSpot(TM) Client VM (build 1.4.2-beta-b11, mixed mode)

Exception: java.lang.IllegalArgumentException: null source
------------------ log end -------------------------------------


CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta FIXED IN: tiger-beta INTEGRATED IN: tiger-b28 tiger-beta

EVALUATION ###@###.### 2003-01-09 Not sure if all those obvious mis-uses should explicitely documented. Commit to tiger. ###@###.### 2003-10-09 The InvalidArgumentException is thrown if null is passed for source. This happens because source is passed the the superclass' (EventObject) constructor. This constructor actually throws the exception. However, the specification of EventObjects constructor doesn't specify this exception. It is debatable if IllegalArgumentException is appropriate for a null argument; perhaps NullPointerException is more logical. Also, it is not clear why is is necessary to reject null at all.

PUBLIC COMMENTS SPEC: LineEvent: unspecified IllegalArgumentException