It will be better if StringLocalizer will throw an explicit exception when key is set to null

XMLWordPrintable

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: P4
    • fx1.3
    • Affects Version/s: fx1.2
    • Component/s: javafx
    • None


      Currently you would not be able to catch an exception by calling StringLocalizer { key: null }. Suppose key should not be able to set to null.

      var p2 = true;
      try {
          var a2 = StringLocalizer { key: null };
          p2 = false;
      }
      catch (e2 : NullPointerException) {
      }

      System.out.println("test pass: {p2}");

      I think it is better and easier o fix the issue at javafx.util.StringLocalilzer(choice a). Catch and rethrow the exception from there for being able to catch the exception from an application level.

            Assignee:
            Naoto Sato
            Reporter:
            Jane Wang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: