private static <R extends KeyRange> byte[] specialEndKey(R range) {
    byte[] end = range.getEndKey();
    if (end.length == 0) {
      return ENDKEY;
    }
    return end;
  }
SPECIAL CASE wrapper for empty end key
@return ENDKEY if end key is empty, else normal endkey.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionSplitCalculator.java