@Override
  public String toString() {
    StringBuilder builder = new StringBuilder("[");
    for (HRegionLocation loc : locations) {
      if (builder.length() > 1) {
        builder.append(", ");
      }
      builder.append(loc == null ? "null" : loc);
    }
    builder.append("]");
    return builder.toString();
  }
Returns the first not-null region location in the list
hbase-client/src/main/java/org/apache/hadoop/hbase/RegionLocations.java