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

Union of Unknown types should be Unknown

    XMLWordPrintable

    Details

    • Type: False-Positive
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.10
    • Component/s: Semantic
    • Labels:

      Description

          try {
      
          } catch (Unknown1| Unknown2 e) {
            // e.symbolType() is Object, incorrect
          } catch (Unknown1| IllegalArgumentException e) {
            // e.symbolType() is Object, incorrect
          } catch (IOException| IllegalArgumentException e) {
            // e.symbolType() is Exception, correct
          }
      
      

      This typically happens when the project is not configured correctly (probably sonar.java.libraries missing).
      This introduces FP in S3457 (only when the semantic is incomplete).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              michael.gumowski Michael Gumowski
              Reporter:
              quentin.jaquier Quentin Jaquier
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: