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

Dangling `CharacterCodingException` in a few javadoc descriptions

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 21
    • core-libs
    • None
    • behavioral
    • minimal
    • This is a documentation change only.
    • Java API
    • SE

      Summary

      In a few javadoc places, there are throws CharacterCodingException sections without any description to them.

      Problem

      In the javadocs for java.nio.charset.CharsetEn/Decoder.en/decode(in) and java.nio.charset.CoderResult.throwException() methods, there are CharacterCodingException without any description to it. This is because the exception is checked with the methods' signatures, but not explicitly described in the method descriptions.

      Solution

      Add the @throws CharacterCodingException to those methods.

      Specification

      Add the following @throws tags to $otype$ java.nio.charset.CharsetEn/Decoder($itype$ in) methods:

        * @throws  CharacterCodingException
        *          {@code MalformedInputException} if the $itype$ sequence starting at the
        *          input buffer's current position is $notLegal$ and the current
        *          malformed-input action is {@code CodingErrorAction.REPORT};
        *          {@code UnmappableCharacterException} if the $itype$ sequence starting at
        *          the input buffer's current position cannot be mapped to an
        *          equivalent $otype$ sequence and the current unmappable-character
        *          action is {@code CodingErrorAction.REPORT}

      Add the following @throws tag to java.nio.charset.CoderResult.throwException() method:

        * @throws  CharacterCodingException
        *          {@code MalformedInputException} if this object represents a
        *          malformed-input error; {@code UnmappableCharacterException}
        *          if this object represents an unmappable-character error

            naoto Naoto Sato
            naoto Naoto Sato
            Alan Bateman, Iris Clark, Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: