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

Missing @throws in DateTimeFormatterBuilder.appendOffset

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b50

      Backports

        Description

        The method DateTimeFormatterBuilder.appendOffset(String,String) can throw an exception that is not properly specified. The current spec implies an exception as follows: "The format of the offset is controlled by a pattern which must be one of the following", however there is no @throws clause.

        Fix proposed as follows:

             * @param pattern the pattern to use, not null
             * @param noOffsetText the text to use when the offset is zero, not null
             * @return this, for chaining, not null
             * @throws IllegalArgumentException if the pattern is invalid
             */
            public DateTimeFormatterBuilder appendOffset(String pattern, String noOffsetText) {

        (around line 914)

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                rriggs Roger Riggs
                Reporter:
                scolebourne Stephen Colebourne
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: