code: private void setBandFinalHeight(JRDesignBand band, int currHeigth, boolean fitToContent) {
          if (band != null) {
              int finalHeight = LayoutUtils.findVerticalOffset(band);
              //noinspection StatementWithEmptyBody
              if (finalHeight < currHeigth && !fitToContent) {
                  //nothing
              } else {
                  band.setHeight(finalHeight);
              }
          }
  
      }
docs: Removes empty space when "fitToContent" is true and real height of object is
  taller than current bands height, otherwise, it is not modified
  
  @param band
  @param currHeigth
  @param fitToContent