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

Avoid charset lookup machinery in java.nio.charset.StandardCharsets

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P3
    • 11
    • None
    • core-libs

    Description

      The public fields of StandardCharsets are part of the public API, so they definitely need to exist. So let's create them directly (i.e. using "new", not Charset.forName) and don't bother putting these fields anywhere else (i.e. get rid of the INSTANCE singleton fields)

      (Motivation: I ran into trouble using reflection via StandardCharsets.<clinit> too early during bootstrap with a local mod.)

      Attachments

        Issue Links

          Activity

            People

              martin Martin Buchholz
              martin Martin Buchholz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: