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

TransferHandler.exportToClipboard prints stacktrace even if succeeded

    XMLWordPrintable

Details

    • Cause Known
    • x86_64
    • windows_10

    Description

      ADDITIONAL SYSTEM INFORMATION :
      Windows 10, 64 Bit
      Java 11.0.7

      A DESCRIPTION OF THE PROBLEM :
      This is similar to JDK-6606476.

      TransferHandler.exportToClipboard tries to write contents to the clipboard in various formats and DataFlavors. If an exception occurs in one iteration, it is printed to the console and the loop continues.

      This is confusing, especially if exporting succeeded for another DataFlavor or another format.
      But since the exception is printed and not rethrown, this cannot be controlled by the application.

      The experience occurs for JPEG images containing an alpha component, since support for which was dropped in JDK-8204187.
      Also, we use ImageIO plugins provided by https://github.com/haraldk/TwelveMonkeys to reenable support for images with an alpha component, but because of the described behavior

      Instead of printing the exception on the standard console, the fix replaces printing the stack trace of any exception that may occur while placing data to the clipboard with logging.

      FREQUENCY : always


      Attachments

        Issue Links

          Activity

            People

              skodandarama Suman Rajkumaar Kodandarama (Inactive)
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: