8016563: Test closed/java/awt/dnd/ImageTransferTest/ImageTransferTest.html fails

Reviewed-by: anthony, serb
This commit is contained in:
Petr Pchelko 2013-09-27 18:35:00 +04:00
parent 9d67cb2e94
commit 247ec6ca80

View File

@ -1793,8 +1793,17 @@ search:
} catch (Exception e) {
throw new IOException(e.getMessage());
}
// Target data is Image
} else if (DataFlavor.imageFlavor.equals(flavor)) {
if (!isImageFormat(format)) {
throw new IOException("data translation failed");
}
theObject = platformImageBytesToImage(inputStreamToByteArray(str), format);
}
if (theObject == null) {
throw new IOException("data translation failed");
}
return theObject;