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

Reviewed-by: prr, dnguyen
This commit is contained in:
Alisen Chung 2022-06-06 21:22:38 +00:00 committed by Phil Race
parent e94b05c720
commit 5264881a15

View File

@ -83,13 +83,7 @@ final class WClipboard extends SunClipboard {
translateTransferable(contents, flavor, format);
publishClipboardData(format, bytes);
} catch (IOException e) {
// Fix 4696186: don't print exception if data with
// javaJVMLocalObjectMimeType failed to serialize.
// May remove this if-check when 5078787 is fixed.
if (!(flavor.isMimeTypeEqual(DataFlavor.javaJVMLocalObjectMimeType) &&
e instanceof java.io.NotSerializableException)) {
e.printStackTrace();
}
// Cannot be translated in this format, skip
}
}
} finally {