if (sumDelta == 0) return;
  private static void adjustSmaller(int allocated, SizeRequirements[] children,                                    int[] spans, int span)  {    // Sum up (prefSize - minSize) over all children    int sumDelta = 0;    for (int i = 0; i < children.length; i++)      sumDelta += children[i].preferred - children[i].minimum;    // Adjust all sizes according to their preferred and minimum sizes.    for (int i = 0; i < children.length; i++)      {        double factor = ((double) (children[i].preferred - children[i].minimum))                        / ((double) sumDelta);        // In case we have a sumDelta of 0, the factor should also be 0.        if (Double.isNaN(factor))          factor = 0;        spans[i] -= factor * (span - allocated);      }  }