Uploaded image for project: 'Maven Checkstyle Plugin'
  1. Maven Checkstyle Plugin
  2. MCHECKSTYLE-240

add 17, 31 and 37 to ignored MagicNumber

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.12.1
    • 2.13
    • None

    Description

      these are classical in hash calculations

            public int hashCode()
           {
               int hash = 17;
               hash = hash * 31 + field1.hashCode();
               hash = hash * 31 + field2.hashCode();
               return hash;
           }

      or

            public int hashCode()
           {
               int hash = 17;
               hash = hash * 37 + field1.hashCode();
               hash = hash * 37 + field2.hashCode();
               return hash;
           }

      Attachments

        Activity

          People

            hboutemy Herve Boutemy
            hboutemy Herve Boutemy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: