TextLayout handling of empty strings

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 26
    • Affects Version/s: 1.2.0
    • Component/s: client-libs
    • None
    • 2d
    • b16
    • x86, sparc
    • solaris_2.5.1, solaris_2.6, windows_nt

      TextLayout should deal more gracefully with zero length strings. Currently the exception listed below is the one that is thrown.

      new TextLayout("", f, new FontRenderContext(null, false, false));

      > Exception in thread "main" java.lang.IllegalArgumentException: Zero length
      > string passed to TextLayout constructor.
      > at java.lang.Throwable.<init>(Compiled Code)
      > at java.lang.Exception.<init>(Compiled Code)
      > at java.lang.RuntimeException.<init>(Compiled Code)
      > at java.lang.IllegalArgumentException.<init>(Compiled Code)
      > at java.awt.font.TextLayout.<init>(Compiled Code)
      > at test.main(Compiled Code)

            Assignee:
            Doug Felt (Inactive)
            Reporter:
            Brian Lichtenwalter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: