Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-2511

Value allows equals(byte[])

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • None

    Description

      Right now the equals(Object) method for Value is

       @Override
        public boolean equals(Object right_obj) {
          if (right_obj instanceof byte[]) {
            return compareTo((byte[]) right_obj) == 0;
          }
          if (right_obj instanceof Value) {
            return compareTo(right_obj) == 0;
          }
          return false;
        }
      
      

      It's in a section that says it was copied from BytesWritable.

      If we're not using this optimization anywhere, I'd rather remove it since it is non-intuitive.

      If we are using it, I'd prefer we move it into something other than the general equals

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              busbey Sean Busbey
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: