I concur with the caution here. When looking at the lazy initialization
change, it never occurred to me that first-use could actually occur
after shutdown had commenced.
David
Martin Buchholz said the following on 04/14/09 06:57:
On Mon, Apr 13, 2009 at 10:56, Mandy Chung <[email protected]> wrote:
With the fix for 6829503, ApplicationShutdownHook and DeleteOnExitHook are
both lazily initialized. Since it is possible that a file could be added to
the list for DeletedOnExit during shutdown, perhaps we also need to change
the Shutdown.add method to allow DeleteOnExitHook to be added during
shutdown.
Shutdown is very tricky, and it seems like a big change to allow
shutdown hooks to be registered after shutdown has commenced.
That's not a no vote, but please be very careful fixing this.
I don't have a high degree of confidence that my own fix is correct,
but it is conservative and it fixes the test failure.
Martin