Try...Finally...

2012-07-26
2013-04-24
  • Melloware Inc

    Melloware Inc - 2012-07-26

    I am using a try…finally with no catch clause as  I am throwing the exception on the method signature.  I didn't want to report it as a Trac bug yet if someone has already fixed it but no matter what the finally{} clause is showing up as YELLOW as potentially not all scenario's hit.  A finally clause is always executed no matter what once the inside of the try is reached?

     
  • Marc R. Hoffmann

    This is an compiler artifact: The Java compiler actually compiles the code in your finally block twice: Once for the good case and once for the exeption path. Future versions might have a filtering option for this.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks