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

Avoid looking up standard charsets in security libraries

    XMLWordPrintable

    Details

    • Resolved In Build:
      b23

      Description

      In many places standard charsets are looked up via their names, for example:
      "Mighty Aphrodite".getBytes("UTF8")

      This could be done more efficiently with use of java.nio.charset.StandardCharsets:
      "Mighty Aphrodite".getBytes(UTF_8)

      The later variant also makes the code cleaner, as it is known not to throw UnsupportedEncodingException in contrary to the former variant.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              igerasim Ivan Gerasimov
              Reporter:
              igerasim Ivan Gerasimov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: