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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8u20
    • Component/s: javafx
    • Labels:
      None
    • Environment:
    • Subcomponent:

      Description

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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported: