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

Text controls need to handle null strings gracefully

XMLWordPrintable

      When using bindings, it is easy to end up in a situation where a null string is passed to a text control (and would be very cumbersome to construct some binding to avoid this). The TextProperty in TextInputControl does not handle this situation well, as it passes the null string directly to the Content, which throws an exception. I think it is valid for Content to require a non-null String, because it is an implementation class and null would indicate an error (such as this one) in our own code. However, the text property needs to handle null strings gracefully. This is probably about a 1 line fix.

            rbair Richard Bair (Inactive)
            rbair Richard Bair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: