aboutsummaryrefslogtreecommitdiff
path: root/doc/TODO.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/TODO.txt')
-rw-r--r--doc/TODO.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/TODO.txt b/doc/TODO.txt
index 4f2e4a6a..87bfb55f 100644
--- a/doc/TODO.txt
+++ b/doc/TODO.txt
@@ -12,8 +12,9 @@ A lot has been tried:
Tried tactics, and why they won't work:
- - Replace every 'return', 'break', and 'continue' statement (for the latter 2, only if they break/continue out of the try block) with a block that first sets a uniquely named flag before doing the operati
- Then, check that flag in the finally block to see if the cleanup call should be guarded by a try/catchThrowable. This doesn't work, because its not possible to instrument the 4th way out of a try block
+ - Replace every 'return', 'break', and 'continue' statement (for the latter 2, only if they break/continue out of the try block) with a block that first sets a uniquely named flag before doing the operation.
+ Then, check that flag in the finally block to see if the cleanup call should be guarded by a try/catchThrowable. This doesn't work, because its not possible to instrument the 4th way out of a try block:
+ just running to the end of it. Putting a 'flag = true;' at the end isn't safe, because that might be unreachable code.
- Put catch blocks in for all relevant exceptions (RuntimeException, Error, all exceptions declared as thrown by the method, and all types of exceptions of the catch blocks of encapsulating try blocks.
This doesn't work, partly because it'll fail for sneakily thrown exceptions, but mostly because you can't just catch an exception listed in the 'throws' clause of the method body; catching an exception
@@ -21,6 +22,7 @@ A lot has been tried:
- Put in a blanket catch Throwable to set the flag. Two problems with this:
First, sneaky throw can't be done. Thread.stop invokes a security manager and triggers a warning, Calling a sneakyThrow method creates a runtime dependency on lombok, constructing a sneakyThrow in-class
+ requires either lots of "$1" classes that clog up permgen, or are slow and require reflection tricks to load live off of a byte array literal.
Secondly, this would mean that any statements in the try body that throw an exception aren't flagged to the user as needing to be handled. Unacceptable.
The Cleanup annotation now also calls the cleanup method for you, and will call it at the END of the current scope. The following plans have been tried and abandoned: