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

Alisen Chung achung at openjdk.java.net
Tue May 31 21:28:25 UTC 2022


On Wed, 25 May 2022 06:08:54 GMT, Phil Race <prr at openjdk.org> wrote:

>> Removed stacktrace from WClipboard
>
> src/java.desktop/windows/classes/sun/awt/windows/WClipboard.java line 89:
> 
>> 87:                     // javaJVMLocalObjectMimeType failed to serialize.
>> 88:                     // May remove this if-check when 5078787 is fixed.
>> 89:                     if (!(flavor.isMimeTypeEqual(DataFlavor.javaJVMLocalObjectMimeType) &&
> 
> https://bugs.openjdk.java.net/browse/JDK-5078787 is not fixed .. so .. ?

I think printing the exception here isn't necessary because the code loops through all possible formats and checks if encoding is possible. If encoding isn't possible then it should skip the format and not print an error.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8871



More information about the client-libs-dev mailing list