void setCells(ArrayList<Cell> cells) {
    this.cells = new ArrayList<>((ArrayList) cells);
    this.families = null;
  }
This is just for keeping compatibility for CPs, in HBase you should call the below
{@link #setExtendedCells(ArrayList)} directly to avoid casting.
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALEdit.java