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

[macosx] Enhance handling of UTF-8 characters in CDataTransfer.java

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • 9
    • client-libs
    • None
    • b147
    • x86
    • os_x

    Description

      Suggestion to change the handling of UTF-8 characters in CDataTransfer.java

      charset = new String((byte[]) transferable.getTransferData(javaTextEncodingFlavor), "UTF-8”);

      should probably be changed to

         import java.nio.charset.StandardCharsets;
         [...]
         charset = new String((byte[]) transferable.getTransferData(javaTextEncodingFlavor), StandardCharsets.UTF_8);

      to avoid the unnecessary charset lookup. Suggestion is made just to improve the codebase.

      Attachments

        Issue Links

          Activity

            People

              mhalder Manajit Halder (Inactive)
              mhalder Manajit Halder (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: