[prev in list] [next in list] [prev in thread] [next in thread]
List: groovy-scm
Subject: [groovy-scm] [jira] Commented: (GROOVY-1564) finally not called if try contains
From: "Paul King (JIRA)" <jira () codehaus ! org>
Date: 2006-11-29 5:30:41
Message-ID: 40463142.1164778241572.JavaMail.haus-jira () codehaus01 ! managed ! contegix ! com
[Download RAW message or body]
[ http://jira.codehaus.org/browse/GROOVY-1564?page=comments#action_81366 ]
Paul King commented on GROOVY-1564:
-----------------------------------
Just a note that this isn't isolated to static methods, the following also replicates \
the problem:
{code:java}
def main() {
try {
println "try"
return
} finally {
println "finally"
}
}
main()
{code}
> finally not called if try contains return
> -----------------------------------------
>
> Key: GROOVY-1564
> URL: http://jira.codehaus.org/browse/GROOVY-1564
> Project: groovy
> Issue Type: Bug
> Affects Versions: 1.0-JSR-6
> Environment: Java 5, Win XP SP 2
> Reporter: Maurice Nicholson
> Assigned To: Guillaume Laforge
> Priority: Critical
> Fix For: 1.0-RC-1
>
>
> From the original email:
> [Maurice]
> Hi,
> if I compile and run this as a java class
> {noformat}
> public class finallytest {
> public static void main(String[] args) {
> testit();
> }
> public static int testit() {
> try {
> System.out.println("try");
> return 1;
> } finally {
> System.out.println("finally");
> }
> }
> }
> {noformat}
> I get
> {noformat}
> try
> fiinally
> {noformat}
> If I run in as a Groovy class I get
> {noformat}
> try
> {noformat}
> Is this intentional?
> [John]
> No it's a bug.
> Would you please riase a JIRA issue for this?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: \
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
<hr/>
<p>
To unsubscribe from this list please visit:
</p>
<p>
<a href="http://xircles.codehaus.org/manage_email">http://xircles.codehaus.org/manage_email</a>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic