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

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

XMLWordPrintable

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

      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);

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

              Created:
              Updated:
              Resolved:
              Imported: