Uploaded image for project: 'REEF (Retired)'
  1. REEF (Retired)
  2. REEF-1047

ConstructorDefImpl.hashCode function should consider `className`

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.14
    • Tang
    • None

    Description

      `hashCode` function should consider all fields to distinguish objects. This issue fixes the `hashCode` function of `ConstructorDefImpl` class to consider `className` and `args` together.

      ConstructorDefImpl.java
         public int hashCode() {
           final ConstructorArg[] argsSort = getArgs().clone();
           Arrays.sort(argsSort);
      -    return Arrays.hashCode(argsSort);
      +    int result = Arrays.hashCode(argsSort);
      +    result = 31 * result + (this.className == null ? 0 : this.className.hashCode());
      +    return result;
         }
      

      Attachments

        Issue Links

          Activity

            People

              dongjoon Dongjoon Hyun
              dongjoon Dongjoon Hyun
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: