Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
1.0, 1.1-beta-1
-
None
-
None
-
Ubuntu Linux 6.10, Java SE 6, Groovy 1.1 Beta 1
Description
When using a try-finally block in methods with return values then the finally block will not always be executed.
Here's a script which demonstrates the problem:
boolean foo () {
try
finally
{ println "finally" }}
foo ()
Output after starting: eddie@saringnb:~$ groovy test.groovy
try
Finally will only be executed when removing the line " if (0 == 1) return false".
I've reported a similar problem for Groovy 1.0 (http://jira.codehaus.org/browse/GROOVY-1663), probably it was not solved completely.
BTW: Is there a planning for a bugfix release (e.g. 1.0.1) without new features which just removes these critical bugs? Would be important for production usage.
Thanks in advance,
Stefan