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

S1948: FP when multiple bounds in parameter type.

    Details

    • Type: False-Positive
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 6.2
    • Component/s: Rules
    • Labels:
      None

      Description

      Reproducer

      class Person6<T extends Address & Serializable> implements Serializable {
        T t; //Compliant
      }
      

      If we switch the order of the bounds in the type parameter, the warning is not shown:

      class Person6<T extends Serializable & Address> implements Serializable {
        T t; //Compliant
      }
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated: