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

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

XMLWordPrintable

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

      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.

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

              Created:
              Updated:
              Resolved: