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

FP on S3242 with Collection parameter when method is annotated with @Autowired

    Details

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

      Description

       @Autowired (required = false)
        public void setQueues (Collection<SomeBeanType> queues) { // false positive : if collection is changed to iterable : spring autowiring will break.
          for (SomeBeanType queue: queues) {
            this.queues.add (queue);
          }
        }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                christophe.zurn Christophe Zurn
                Reporter:
                nicolas.peru Nicolas Peru
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: