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

javafxgui contains a comparison between two unrelated types

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P1
    • Resolution: Fixed
    • Affects Version/s: fx1.1
    • Fix Version/s: fx1.1
    • Component/s: javafx
    • Labels:

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported: