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

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

XMLWordPrintable

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

      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.)

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

              Created:
              Updated:
              Resolved: