Window.dispose() can be a recursive call
While working on porting Marathon to Java 5, I found a funny problem. We use a TestDialog(derived from JDialog) for running most of the component related test cases. When run under Java 5, the dispose() of TestDialog is being called multiple times. Since TestDialog.dispose() calls super.dispose() this goes into a loop. The number of times TestDialog.dispose() is called is random. I dug into the sources and found that since some developers might not call super.dispose() in classes derived from Window, the VM calls dispose() for them.. So a little bit of sloppy programming would have helped.