SonarQube Java
  1. SonarQube Java
  2. SONARJAVA-259

Rule: Constants should be 'final static' and not only 'final'

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4
    • Component/s: Rules
    • Labels:
      None
    • Number of attachments :
      0

      Activity

      Hide
      Dinesh Bolkensteyn added a comment -

      Done

      Show
      Dinesh Bolkensteyn added a comment - Done
      Hide
      Freddy Mallet added a comment -

      Manually tested !

      Show
      Freddy Mallet added a comment - Manually tested !
      Hide
      Freddy Mallet added a comment -

      Oups, the rule 'Final Field Could Be Static' must be removed from "Sonar way" quality profile.

      Show
      Freddy Mallet added a comment - Oups, the rule 'Final Field Could Be Static' must be removed from "Sonar way" quality profile.
      Hide
      Dinesh Bolkensteyn added a comment -

      That's SONARJAVA-203 again, so I'll close this ticket.

      Show
      Dinesh Bolkensteyn added a comment - That's SONARJAVA-203 again, so I'll close this ticket.
      Hide
      Dinesh Bolkensteyn added a comment -

      There are some false positives when array containers are used.

      private final int[] firstUsage = new int[6];
      

      Perhaps we should exclude initializers which contain a [, just like we exclude the ones having a (.

      Show
      Dinesh Bolkensteyn added a comment - There are some false positives when array containers are used. private final int [] firstUsage = new int [6]; Perhaps we should exclude initializers which contain a [, just like we exclude the ones having a (.
      Hide
      Freddy Mallet added a comment -

      Good catch Dinesh, you can go ahead to support this exclusion !

      Show
      Freddy Mallet added a comment - Good catch Dinesh, you can go ahead to support this exclusion !
      Hide
      Dinesh Bolkensteyn added a comment -

      Done

      Show
      Dinesh Bolkensteyn added a comment - Done
      Hide
      Freddy Mallet added a comment -

      Manually tested !

      Show
      Freddy Mallet added a comment - Manually tested !

        People

        • Assignee:
          Dinesh Bolkensteyn
          Reporter:
          Freddy Mallet
        • Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: