"java.lang.IllegalArgumentException: Invalid expression." when parsing ${(10 * 5) - 13}

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 8u20
    • Affects Version/s: 8
    • Component/s: javafx
    • None
    • Environment:

      When using grouping of expressions a following minus sign will be discovered as UNARY_OPERATOR -> NEGATE instead of BINARY_OPERATOR -> SUBTRACT.
      This is because of line 415 in class com.sun.javafx.fxml.expression.Expression in method tokenize, which doesn't consider, that after a TokenType.END_GROUP a BINARY_OPERATOR must follow.
      So the line should read as follows:

      unary = !(token.type == TokenType.LITERAL || token.type == TokenType.VARIABLE || token.type == TokenType.END_GROUP);

            Assignee:
            Martin Sládeček
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: