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

(cs) Constructor for java.nio.charset.Charset accepts invalid charset name

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 6
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b59
    • CPU:
      generic
    • OS:
      generic

      Description

      The spec for java.nio.charset.Charset says: "A charset name must begin with either a letter or a digit."

      The specs for the java.nio.charset.Charset constructor and many methods of the class say: "Throws: IllegalCharsetNameException - If the canonical name or any of the aliases are illegal"

      But the constructor and the methods accept, for example, the following invalid charset names: "-", "_", ":", "."

        Attachments

          Activity

            People

            Assignee:
            sherman Xueming Shen
            Reporter:
            asutchil Arkadiy Sutchilin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: