Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-628

Javadoc for HashCodeBuilder.append(boolean) does not match implementation.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.0
    • lang.*
    • None

    Description

      The Javadoc description for HashCodeBuilder.append(boolean) says that it "adds iConstant * 1 to the hashCode," however, the code is actually:
      iTotal = iTotal * iConstant + (value ? 0 : 1). It is probably just a typo, but it easy to correct.

      And the reference to hashCode handling in java.lang.Boolean: "not a 1231 or 1237 as done in java.lang.Boolean" could be clarified with more detail. Otherwise, it requires going to the java.lang Javadoc and finding the java.lang.Boolean.hashCode Javadoc description.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sparkspit Sean Mickey
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified