-
Bug
-
Resolution: Cannot Reproduce
-
P5
-
None
-
1.1.4
-
x86
-
windows_nt
Name: joT67522 Date: 12/16/97
The following code triggers a NullPointerException:
import java.awt.Frame;
import java.awt.event.WindowAdapter;
public class Bug_DSB_19971216 {
public static void main(String [] argv)
{
Frame f = new Frame();
f.addWindowListener(new WindowAdapter() { });
f.dispose();
}
}
If Windows didn't suck, I'd cut and paste the
the stack trace. However, it does, so here is a
paraphrase, transcribed by hand:
NullPointerException
at Toolkit.getEventQueue(line 670)
at Window.postWindowEvent(line 165)
at Window.dispose(line 182)
at Frame.dispose(line 37)
at <my class>
Apparently, dispose() was never tested without
calling show(). (Calling show() causes the null
pointer exception to disappear.)
(Review ID: 22037)
======================================================================