[kaffe] Runtime.addShutdownHook()

Mark Wielaard mark at klomp.org
Sun Apr 27 05:03:01 PDT 2003


Hi,

Since Runtime shutdown hooks are not guaranteed to run it would be nice
to be able to add them anyway. Currently the code throws an Error which
terminates my program.

Could you consider changing the code to something like the following?

diff -u -r1.21 Runtime.java
--- libraries/javalib/java/lang/Runtime.java    21 Jan 2003 11:28:25 -0000     1.21
+++ libraries/javalib/java/lang/Runtime.java    27 Apr 2003 11:57:39 -0000
@@ -177,7 +177,7 @@
  
 public void addShutdownHook(Thread hook) {
        // XXX implement me
-       throw new kaffe.util.NotImplemented(
+       System.err.println("WARNING: Not implemented method called " +
            getClass().getName() + ".addShutdownHook()");
 }

Cheers,

Mark





More information about the kaffe mailing list