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

javafxgui contains a comparison between two unrelated types

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1 P1
    • fx1.1
    • fx1.1
    • javafx

      This issue is related to JFXC-2651. If the compiler is fixed so that it statically detects wrong comparisons (e.g. a == b, where a is of type A and b is of type B where A and B are unrelated types) javafxgui fails to compile with the following message:

       [javafxc] /usr/local/home/maurizio/Desktop/fx/franca/javafxgui/src/com/sun/stylesheet/javafx/PaintConverter.fx:199: incomparable types: com.sun.stylesheet.css.parser.Token and String
        [javafxc] inverseSplit = paint9Bounds.getFirstToken() == "inverse";
        [javafxc] ^
        [javafxc] 1 error

      The compiler complains because a String cannot be compared to com.sun.stylesheet.css.parser.Token (the result of the comparison would be always false!).

      I checked the code - the offending bits seems to be related to an unused flag called 'inverse' split. Removing it makes the problem go away.

            kcr Kevin Rushforth
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: