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

Getters are not properly recognized as accessors in all cases

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      The getter

       
      public String getName(){
           return this.name;
      }
      

      is not recognized as an accessor, whereas

       
      public String getName(){
           return name;
      }
      

      is recognized.

      Please find a sample project that illustrates this bug. There are 2 classes, one is using this.name, one is using just 'name'.

        Attachments

        1. hellobean.png
          hellobean.png
          8 kB
        2. hellobean2.png
          hellobean2.png
          9 kB
        3. helloworld.zip
          0.9 kB

          Issue Links

            Activity

              People

              Assignee:
              freddy.mallet Freddy Mallet (Inactive)
              Reporter:
              vlatombe Vincent Latombe
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: