Ensure that transfer data can be retrieved

MYC-Refactor
Hammy 3 years ago
parent 6beeaafad9
commit 0e76d29495

@ -31,7 +31,9 @@ abstract class ClipboardListener {
String newContent = null;
try {
if (clipboardContents.isDataFlavorSupported(TEXT.getDataFlavor())) {
newContent = (String) clipboardContents.getTransferData(TEXT.getDataFlavor());
}
} catch (UnsupportedFlavorException | IOException exp) {
exp.printStackTrace();
}
@ -63,7 +65,9 @@ abstract class ClipboardListener {
List<File> fileList = null;
try {
if (clipboardContents.isDataFlavorSupported(FILELIST.getDataFlavor())) {
fileList = (List<File>) clipboardContents.getTransferData(FILELIST.getDataFlavor());
}
} catch (UnsupportedFlavorException | IOException exp) {
exp.printStackTrace();
}

Loading…
Cancel
Save