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

URLEncoder should specify that replacement bytes will be used in case of coding error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 22
    • None
    • core-libs
    • b26

    Description

      The long standing behaviour in URLEncoder has been to use the CharsetEncoder replacement bytes if a character cannot be encoded.

      The API documentation of URLEncoder.encode should spell that out and refer to {@link CharsetEncoder##cae}

      See https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/nio/charset/CharsetEncoder.html#cae

      Note: this will require a CSR

      Attachments

        Issue Links

          Activity

            People

              dclarke Darragh Clarke
              dfuchs Daniel Fuchs
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: