[Control] Unexpected accelerator parsing in TextBinding

XMLWordPrintable

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

      I notice this while working on https://javafx-jira.kenai.com/browse/RT-36570

      One can set
      Button b = new Button("butto_n1@a");
      and that displays "button1"

      the "_" being removed is fine (as parseMneumonic is true)
      But the "@a" being removed is not expected, that happens to the accelerator parsing code in TextBinding.
      This seems old code that should be removed.
      Note that new Button("butto_n1@Ctrl+a"); fails because of the token.toUpperCase(Locale.ROOT) in line 350 of TextBinding#parseAcceleratorText(). Which is further indication the code is left in a bad state.
      Furthermore, TextBinding#getAcceleratorText() and TextBinding#getAccelerator() are not used. Again, proving this is legacy code...

            Assignee:
            Jonathan Giles
            Reporter:
            Felipe Heidrich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: