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

FP in S2384, S2386: support common method returning unmodifiable collections

    Details

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

      Description

      S2384 and S2386 does not raise an issue when a variable is initialized with List.of(..) (SONARJAVA-3086), but still raises FP when similar methods returning unmodifiable collections are used:

      For Map, List, Set:

      Additionally for Map:

       

      We should make sure to support them the same way.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: