Name: sdC67446 Date: 06/05/98
The spec for ctor java.util.EventObject(Object source)
does not specify behavior if 'source' == null.
Currently ctor throws uexpected IllegalArgumentException.
--------------Here is what doc says:--------------
public EventObject(Object source)
Constructs a prototypical Event
Parameters:
source - The object that the Event occurred upon.
-----Here is the test demonstrating the bug:------
import java.util.EventObject;
public class Test {
public static void main(String[] args) {
try {
EventObject eo = new EventObject(null);
} catch (Exception e) {
System.out.println(e);
}
}
}
-----Here is output from test:--------------------
java.lang.IllegalArgumentException: null source
--------------------------------------------------
======================================================================
The spec for ctor java.util.EventObject(Object source)
does not specify behavior if 'source' == null.
Currently ctor throws uexpected IllegalArgumentException.
--------------Here is what doc says:--------------
public EventObject(Object source)
Constructs a prototypical Event
Parameters:
source - The object that the Event occurred upon.
-----Here is the test demonstrating the bug:------
import java.util.EventObject;
public class Test {
public static void main(String[] args) {
try {
EventObject eo = new EventObject(null);
} catch (Exception e) {
System.out.println(e);
}
}
}
-----Here is output from test:--------------------
java.lang.IllegalArgumentException: null source
--------------------------------------------------
======================================================================
- duplicates
-
JDK-4935655 EventObject's constructor throws IllegalArgumentException
-
- Closed
-
- relates to
-
JDK-4885993 java.awt.datatransfer.FlavorEvent: null reaction
-
- Closed
-