Ignore:
Timestamp:
2016-03-02T22:54:34+01:00 (4 years ago)
Author:
Don-vip
Message:

ChangesetCacheManager: add unit tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r9732 r9916  
    88import java.awt.Color;
    99import java.awt.Font;
     10import java.awt.HeadlessException;
    1011import java.awt.Toolkit;
    1112import java.awt.datatransfer.Clipboard;
     
    635636     */
    636637    public static String getClipboardContent() {
    637         Transferable t = getTransferableContent(Toolkit.getDefaultToolkit().getSystemClipboard());
    638638        try {
     639            Transferable t = getTransferableContent(Toolkit.getDefaultToolkit().getSystemClipboard());
    639640            if (t != null && t.isDataFlavorSupported(DataFlavor.stringFlavor)) {
    640641                return (String) t.getTransferData(DataFlavor.stringFlavor);
    641642            }
    642         } catch (UnsupportedFlavorException | IOException ex) {
     643        } catch (UnsupportedFlavorException | IOException | HeadlessException ex) {
    643644            Main.error(ex);
    644645            return null;
Note: See TracChangeset for help on using the changeset viewer.