Change log message

MYC-Refactor
Hammy 3 years ago
parent 53cb8a78a9
commit 75789c253a

@ -37,7 +37,7 @@ class ClipboardUtils {
newContent = (String) clipboardContents.getTransferData(TEXT.getDataFlavor()); newContent = (String) clipboardContents.getTransferData(TEXT.getDataFlavor());
} }
} catch (UnsupportedFlavorException | IOException exp) { } catch (UnsupportedFlavorException | IOException exp) {
logger.info("Exception Thrown When Receiving String Content", exp); logger.info("Exception Thrown When Retrieving String Content", exp);
} }
return newContent; return newContent;
@ -57,7 +57,7 @@ class ClipboardUtils {
bufferedImage = convertToBufferedImage((Image) clipboardContents.getTransferData(IMAGE.getDataFlavor())); bufferedImage = convertToBufferedImage((Image) clipboardContents.getTransferData(IMAGE.getDataFlavor()));
} }
} catch (UnsupportedFlavorException | IOException exp) { } catch (UnsupportedFlavorException | IOException exp) {
logger.info("Exception Thrown When Receiving Image Content", exp); logger.info("Exception Thrown When Retrieving Image Content", exp);
} }
return bufferedImage; return bufferedImage;
@ -77,7 +77,7 @@ class ClipboardUtils {
fileList = (List<File>) clipboardContents.getTransferData(FILELIST.getDataFlavor()); fileList = (List<File>) clipboardContents.getTransferData(FILELIST.getDataFlavor());
} }
} catch (UnsupportedFlavorException | IOException exp) { } catch (UnsupportedFlavorException | IOException exp) {
logger.info("Exception Thrown When Receiving File Content", exp); logger.info("Exception Thrown When Retrieving File Content", exp);
} }
return fileList; return fileList;

@ -54,7 +54,7 @@ class ClipboardUtilsTest {
@Test @Test
void failToGetStringContent() throws IOException, UnsupportedFlavorException { void failToGetStringContent() throws IOException, UnsupportedFlavorException {
String expectedStringContent = null; String expectedStringContent = null;
String expectedExceptionMessage = "Exception Thrown When Receiving String Content"; String expectedExceptionMessage = "Exception Thrown When Retrieving String Content";
Throwable expectedException = new UnsupportedFlavorException(TEXT.getDataFlavor()); Throwable expectedException = new UnsupportedFlavorException(TEXT.getDataFlavor());
when(transferableMock.isDataFlavorSupported(TEXT.getDataFlavor())).thenReturn(true); when(transferableMock.isDataFlavorSupported(TEXT.getDataFlavor())).thenReturn(true);
@ -80,7 +80,7 @@ class ClipboardUtilsTest {
@Test @Test
void failToGetImageContent() throws IOException, UnsupportedFlavorException { void failToGetImageContent() throws IOException, UnsupportedFlavorException {
BufferedImage expectedImageContent = null; BufferedImage expectedImageContent = null;
String expectedExceptionMessage = "Exception Thrown When Receiving Image Content"; String expectedExceptionMessage = "Exception Thrown When Retrieving Image Content";
Throwable expectedException = new UnsupportedFlavorException(IMAGE.getDataFlavor()); Throwable expectedException = new UnsupportedFlavorException(IMAGE.getDataFlavor());
when(transferableMock.isDataFlavorSupported(IMAGE.getDataFlavor())).thenReturn(true); when(transferableMock.isDataFlavorSupported(IMAGE.getDataFlavor())).thenReturn(true);
@ -106,7 +106,7 @@ class ClipboardUtilsTest {
@Test @Test
void failToGetFileContent() throws IOException, UnsupportedFlavorException { void failToGetFileContent() throws IOException, UnsupportedFlavorException {
List<File> expectedFileContent = null; List<File> expectedFileContent = null;
String expectedExceptionMessage = "Exception Thrown When Receiving File Content"; String expectedExceptionMessage = "Exception Thrown When Retrieving File Content";
Throwable expectedException = new UnsupportedFlavorException(FILELIST.getDataFlavor()); Throwable expectedException = new UnsupportedFlavorException(FILELIST.getDataFlavor());
when(transferableMock.isDataFlavorSupported(FILELIST.getDataFlavor())).thenReturn(true); when(transferableMock.isDataFlavorSupported(FILELIST.getDataFlavor())).thenReturn(true);

Loading…
Cancel
Save