Changeset 11678 in josm for trunk/src/org


Ignore:
Timestamp:
2017-03-05T00:51:46+01:00 (8 years ago)
Author:
Don-vip
Message:

fix #14459 - Error when pasting data into JOSM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/PasteMembersAction.java

    r11554 r11678  
    55import java.awt.datatransfer.FlavorListener;
    66import java.awt.event.ActionEvent;
     7import java.util.Optional;
    78
    89import javax.swing.TransferHandler.TransferSupport;
     
    4243
    4344    private TransferSupport getSupport() {
    44         return new TransferSupport(memberTable, ClipboardUtils.getClipboardContent());
     45        return new TransferSupport(memberTable, Optional.ofNullable(ClipboardUtils.getClipboardContent())
     46                .orElseThrow(() -> new IllegalStateException("Failed to retrieve clipboard content")));
    4547    }
    4648
Note: See TracChangeset for help on using the changeset viewer.