SonarQube Java
  1. SonarQube Java
  2. SONARJAVA-205

Rule: Equals method should be used to compare strings

    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

      Issue Links

        Activity

        Hide
        Dinesh Bolkensteyn added a comment -

        Done

        Show
        Dinesh Bolkensteyn added a comment - Done
        Hide
        Fabrice Bellingard added a comment - - edited

        Some feedback:

        • Could you update the message (talk only about "==" or "!=") (I updated the message in RSPEC)
        • Is it possible to check for code like this? (PMD detects that)
          if (s1 ==s2) {
            // ....
          }
          
        Show
        Fabrice Bellingard added a comment - - edited Some feedback: Could you update the message (talk only about "==" or "!=") (I updated the message in RSPEC) Is it possible to check for code like this? (PMD detects that) if (s1 ==s2) { // .... }
        Hide
        Dinesh Bolkensteyn added a comment -

        As discussed, the other ticket has been created.

        As for the issue message, the added value does not beat the additional complexity, so let's leave it as is.

        Show
        Dinesh Bolkensteyn added a comment - As discussed, the other ticket has been created. As for the issue message, the added value does not beat the additional complexity, so let's leave it as is.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: