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

Missing @throws in DateTimeFormatterBuilder.appendOffset

XMLWordPrintable

    • b50

        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)

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

                Created:
                Updated:
                Resolved: