<AWT Dev>  fix for JDK-8134612 :clipboard.getData(dataFlavor) can throw UnsupportedFlavorException for registered data flavor
ajit.ghaisas at oracle.com
Mon Nov 28 12:20:53 UTC 2016
Thanks Alex for the review comments.
As suggested, I have updated the test which results in the call to DataTransferer.constructFlavoredObject() method.
Here is the new webrev.
1. If the test in this webrev is run - it results in the java.lang.InternalError - it is due to an open bug JDK-8133719.
2. I have tested the fix on Windows and Mac by temporarily changing the code that results in java.lang.InternalError.
3. Even with change in step2, the test fails with UnsupportedFlavorException on Linux - it will be addressed in JDK-8170390.
This test fix will help in reproducing JDK-8133719 consistently on Windows and Mac.
From: Alexandr Scherbatiy
Sent: Wednesday, September 14, 2016 8:33 PM
To: Ajit Ghaisas; Yuri Nesterenko; awt-dev at openjdk.java.net
Subject: Re:  fix for JDK-8134612 :clipboard.getData(dataFlavor) can throw UnsupportedFlavorException for registered data flavor
On 9/14/2016 1:14 PM, Ajit Ghaisas wrote:
Bug : https://bugs.openjdk.java.net/browse/JDK-8134612
In this test, exportToClipboard() does not export anything to the clipboard due to incorrect text passed to TransferHandler.
Obviously, when we do clipboard.getData() - it throws UnsupportedFlavorException. This is the root cause.
Also, when text is imported, the text String cannot be assigned to MyStringReader class.
The test is corrected to use custom dataflavor containing String to export and import from clipboard.
Also, the test is enhanced to test a custom dataflavor of Color.
I have referred to :
It passes consistently on Windows, Linux and Mac.
Request you to review.
- The test has been designed to check that the reflection in DataTransferer.constructFlavoredObject() method properly works with the modularization system.
Could the test be updated to call the DataTransferer.constructFlavoredObject() method which creates an object using flavor.getRepresentationClass() constructor?
- I also resent the email to the awt-dev alias.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the awt-dev