Simplify code

MYC-Refactor
Hammy 3 years ago
parent c135c56c2a
commit caec66e5fa

@ -31,13 +31,6 @@ public class TransferableFileList implements Transferable {
@Override @Override
public boolean isDataFlavorSupported(DataFlavor flavor) { public boolean isDataFlavorSupported(DataFlavor flavor) {
DataFlavor[] flavors = getTransferDataFlavors(); return flavor == DataFlavor.javaFileListFlavor;
for (DataFlavor dataFlavor : flavors) {
if (flavor.equals(dataFlavor)) {
return true;
}
}
return false;
} }
} }

@ -30,13 +30,6 @@ public class TransferableImage implements Transferable {
@Override @Override
public boolean isDataFlavorSupported(DataFlavor flavor) { public boolean isDataFlavorSupported(DataFlavor flavor) {
DataFlavor[] flavors = getTransferDataFlavors(); return flavor == DataFlavor.imageFlavor;
for (DataFlavor dataFlavor : flavors) {
if (flavor.equals(dataFlavor)) {
return true;
}
}
return false;
} }
} }

Loading…
Cancel
Save