Bugs item #512016, was opened at 2002-02-01 20:08
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=438935&aid=512016&group_id=44253
Category: Other
Group: Annoying
Status: Open
Resolution: None
Priority: 3
Submitted By: Brian Stoler (brianstoler)
Assigned to: Nobody/Anonymous (nobody)
Summary: Get rid of PreventExitSecurityManager
Initial Comment:
Now that the interpreter runs in its own JVM, there is
no need to use the PreventExitSecurityManager. This
comes up in a few cases: When you try to exit JUnit's
Swing UI, and when you hit Command-Q to kill DrJava on
the MacOS.
Instead of the present model (System.exit fails unless
it's called from DefaultGlobalModel.exit()), I think we
should set up an OnExitRegistry, which stores Command
objects to be executed just before System.exit. Then
GlobalModel would register a command to do the
requisite cleanup before quitting (and BTW, the
Registry has to allow the commands to veto the exit).
Then, calls to System.exit() would be OK.
Well, wait -- then how, in the test cases where there
are many GlobalModel objects, would the defunct global
models be prevented from being checked upon exit? By
using a weak reference to the global model? Hmm. This
may not be worth it after all.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=438935&aid=512016&group_id=44253
|