DE_MIGHT_IGNORE only a bug in finally?

2006-07-26
2013-02-05
  • digitaldreamer
    digitaldreamer
    2006-07-26

    Hello all,
    I have been running findbugs on my project for a while but I have recently noticed some code like this:

    catch( Exception e ){}

    This is not detected by DE_MIGHT_IGNORE but code like:

    finally
    {
      try
      {
        doSomething();
      }
      catch( Exception e ){}
    }

    is flagged. In my opinion the only place where it can possibly be correct to ignore an exception in within a finally e.g. tidying up a JDBC resources so why is my first code example not flagged as a bug?