Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8119153

Fix root cause for the "units do not match" console output

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 8
    • javafx

      This message comes out of com.sun.javafx.scene.layout.region.Margins

                  if (topSz.getUnits() == rightSz.getUnits() && topSz.getUnits() == bottomSz.getUnits() && topSz.getUnits() == leftSz.getUnits()) {
                      proportional = topSz.getUnits() == SizeUnits.PERCENT;
                  } else {
                      System.err.println("units do not match");
                  }

      The test is wrong. A mix of em and px size, for example, would be ok since the converted value is going to be in px. The test should check to ensure that if any unit is a percent, all units must be a percent.

      The System.err.println should use the CssLogger at WARNING level and should at least print out the top, right, bottom and left size values.

            dgrieve David Grieve
            dgrieve David Grieve
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: