ListFormat::format specification could be made clearer regarding handling IllegalArgumentException.

XMLWordPrintable

    • Type: CSR
    • Resolution: Approved
    • Priority: P3
    • 22
    • Component/s: core-libs
    • None
    • minimal
    • This is simply a spec clarification.
    • Java API
    • SE

      Summary

      Clarify the @throws IllegalArgumentException clause of 3-arg ListFormat::format()

      Problem

      The current wording is a bit unclear when the exception is thrown.

      Solution

      Explicitly define the conditions for the exception, i.e., IllegalArgumentException is thrown if the given object is neither a List nor an array of Objects, or its length is zero.

      Specification

      Change the @throws clause in the method description as follows:

      -      * @throws    IllegalArgumentException if the given object cannot
      -      *               be formatted
      +      * @throws    IllegalArgumentException if {@code obj} is neither a {@code List}
      +      *               nor an array of {@code Object}s, or its length is zero.
      

            Assignee:
            Naoto Sato
            Reporter:
            Krushnareddy Ganapureddy
            Joe Wang, Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: