Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Finally statement not executed in 3.1 M3!?
Finally statement not executed in 3.1 M3!? [message #187147] Wed, 24 November 2004 09:10 Go to next message
Eclipse UserFriend
Originally posted by: none.nospam.com

Hi all,
I am using Eclipse 3.1 M3 and executing the following code:
// Prepare the output file
File file = new File(filename);
FileOutputStream fos = new FileOutputStream(file);
try {
Result result = new StreamResult(fos);

// Write the DOM document to the file
Transformer xformer =
TransformerFactory.newInstance().newTransformer();
xformer.transform(source, result);
}
finally {
if(fos != null) {
fos.close();
}
}

When I debug this code the stepcursor never reaches the finally statement.
Is this a known issue of this build? (I searched the bugdatabase, but could
not find anything).

kind regards,
Christiaan
Re: Finally statement not executed in 3.1 M3!? [message #187197 is a reply to message #187147] Wed, 24 November 2004 11:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: olivier_thomannNOSPAM.ca.ibm.com

Christiaan a écrit :
> When I debug this code the stepcursor never reaches the finally statement.
> Is this a known issue of this build? (I searched the bugdatabase, but could
> not find anything).
Put a breakpoint in the finally block. It should be reached.
--
Olivier
Re: Finally statement not executed in 3.1 M3!? [message #187218 is a reply to message #187197] Wed, 24 November 2004 15:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.none.com

"Olivier Thomann" <olivier_thomannNOSPAM@ca.ibm.com> schreef in bericht
news:co2b6e$dp1$2@www.eclipse.org...
> Christiaan a
Re: Finally statement not executed in 3.1 M3!? [message #187232 is a reply to message #187218] Wed, 24 November 2004 17:24 Go to previous message
Eclipse UserFriend
Originally posted by: olivier_thomannNOSPAM.ca.ibm.com

Christiaan a écrit :
> Indeed if I put the breakpoint in the finally statement the debugger steps,
> but if I put a breakpoint on "xformer.transform(source, result);" and use
> step over, it skips the finally block. Is this normal behaviour?
Mo, this is not the normal behavior. Report a bug against JDT/Debug with
steps to reproduce, vm version, os, etc.
--
Olivier
Previous Topic:PDT: Choose plug-ins and fragments to launch
Next Topic:IWorkspace
Goto Forum:
  


Current Time: Sat Jul 19 18:58:41 EDT 2025

Powered by FUDForum. Page generated in 0.04248 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top