Rename bufferedImage variable to image

pull/2/head
Hammy 3 years ago
parent 9b29ea29fd
commit 8ed79b2126

@ -61,7 +61,7 @@ class WindowsOrUnixClipboardListener extends ClipboardListener implements Runnab
if (isImageMonitored()) {
if (IMAGE.isAvailable(oldClipboard)) {
MyBufferedImage bufferedImage = clipboardUtils.getImageContent(newClipboardContents);
MyBufferedImage oldBufferedImage = new MyBufferedImage(clipboardContent.getBufferedImage());
MyBufferedImage oldBufferedImage = new MyBufferedImage(clipboardContent.getImage());
if (!bufferedImage.equals(oldBufferedImage)) {
eventManager.notifyImageEvent(clipboardContent, bufferedImage.getBufferedImage());
}

@ -6,23 +6,23 @@ import java.util.List;
public class ClipboardContent {
private String text;
private BufferedImage bufferedImage;
private BufferedImage image;
private List<File> files;
public ClipboardContent(String text) {
this.text = text;
}
public ClipboardContent(BufferedImage bufferedImage) {
this.bufferedImage = bufferedImage;
public ClipboardContent(BufferedImage image) {
this.image = image;
}
public ClipboardContent(List<File> files) {
this.files = files;
}
public BufferedImage getBufferedImage() {
return bufferedImage;
public BufferedImage getImage() {
return image;
}
public String getText() {

@ -151,7 +151,7 @@ class ClipboardUtilsTest {
assertThat(actualClipboardContent.getText(), is(expectedString));
assertThat(actualClipboardContent.getFiles(), is(expectedFiles));
assertThat(actualClipboardContent.getBufferedImage(), is(new BufferedImageMatcher(expectedImage)));
assertThat(actualClipboardContent.getImage(), is(new BufferedImageMatcher(expectedImage)));
verifyNoInteractions(logger);
}
@ -161,7 +161,7 @@ class ClipboardUtilsTest {
ClipboardContent actualClipboardContent = sut.getOldClipboardContent(expectedOldContent);
assertThat(actualClipboardContent.getText(), is(expectedString));
assertThat(actualClipboardContent.getBufferedImage(), is(expectedImage));
assertThat(actualClipboardContent.getImage(), is(expectedImage));
assertThat(actualClipboardContent.getFiles(), is(expectedFiles));
verifyNoInteractions(logger);
}

Loading…
Cancel
Save