Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-17862

Condition that always returns true

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.0, 1.2.6, 1.3.2, 1.1.11, 2.0.0
    • Component/s: Client
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Hi

      In recent github mirror of hbase, I've found the following code smell.

      Path: hbase-client/src/main/java/org/apache/hadoop/hbase/filter/ColumnPaginationFilter.java

      209 
      210     ColumnPaginationFilter other = (ColumnPaginationFilter)o;
      211     if (this.columnOffset != null) {
      212       return this.getLimit() == this.getLimit() &&
      213           Bytes.equals(this.getColumnOffset(), other.getColumnOffset());
      214     }
      

      It should be?

      212       return this.getLimit() == other.getLimit() &&
      

      This might be just a code smell as Bytes.equals can be enough for the return value but wanted to report just in case.

      Thanks!

        Attachments

          Activity

            People

            • Assignee:
              lifove JC
              Reporter:
              lifove JC
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: