State transfer configuration is not set in stone, so I was suggesting to change the state transfer configuration to reject negative values for chunkSize. Then this line would become just

     final int cSize = chunkSize;