Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-3311

SE should correctly handle new class in catch

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.7
    • Component/s: Symbolic Execution
    • Labels:
      None

      Description

      try {
        something();
      } catch (Exception e) {
        new B();
      }
      

      The catch body of the following code generates the exploded graph attached, with two paths going out of the new class:

      • B1.1 -> B1.2 -> B0.0 is expected (new class created)
      • B1-1 -> B0.0 represents the situation where an exception was raised, but is not an exceptional path.

       

        Attachments

        1. newInCatch1.png
          newInCatch1.png
          26 kB
        2. newInCatch2.png
          newInCatch2.png
          29 kB
        3. newInCatch3.png
          newInCatch3.png
          37 kB
        4. newInCatch4.png
          newInCatch4.png
          40 kB
        5. newInCatch4.png
          newInCatch4.png
          41 kB
        6. strangecfg.png
          strangecfg.png
          27 kB

          Issue Links

            Activity

              People

              • Assignee:
                quentin.jaquier Quentin Jaquier
                Reporter:
                quentin.jaquier Quentin Jaquier
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: