Exception printed to stdout on Windows when storing transparent image in clipboard

XMLWordPrintable

    • b26
    • windows

        When storing a transparent image (bitmap with an alpha channel) in the system clipboard on Windows, at exception is printed to standard out, like this:

        java.io.IOException: Registered service providers failed to encode BufferedImage@5a01ccaa: type = 2 DirectColorModel: rm
        ask=ff0000 gmask=ff00 bmask=ff amask=ff000000 IntegerInterleavedRaster: width = 1 height = 1 #Bands = 4 xOff = 0 yOff =
        0 dataOffset[0] 0 to image/jpeg
                at java.desktop/sun.awt.datatransfer.DataTransferer.imageToStandardBytesImpl(DataTransferer.java:1799)
                at java.desktop/sun.awt.datatransfer.DataTransferer.imageToStandardBytes(DataTransferer.java:1713)
                at java.desktop/sun.awt.windows.WDataTransferer.imageToPlatformBytes(WDataTransferer.java:353)
                at java.desktop/sun.awt.datatransfer.DataTransferer.translateTransferable(DataTransferer.java:855)
                at java.desktop/sun.awt.windows.WDataTransferer.translateTransferable(WDataTransferer.java:220)
                at java.desktop/sun.awt.windows.WClipboard.setContentsNative(WClipboard.java:83)
                at java.desktop/sun.awt.datatransfer.SunClipboard.setContents(SunClipboard.java:105)

        The exception is not passed on to user code; it is just consumed and printed to the console in sun.awt.windows.WClipboard.setContentsNative().

        Despite the printed exception, the actual copy works just fine anyway. So this is just annoying noise to the user.

              Assignee:
              Alisen Chung (Inactive)
              Reporter:
              Magnus Ihse Bursie
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: