Changeset 12720 in josm


Ignore:
Timestamp:
2017-09-04T02:18:22+02:00 (3 weeks ago)
Author:
Don-vip
Message:

fix #15224 - CCE: TagTransferData cannot be cast to PrimitiveTagTransferData

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/datatransfer/importers/PrimitiveTagTransferPaster.java

    r10737 r12720  
    4242    public boolean importTagsOn(TransferSupport support, Collection<? extends OsmPrimitive> selection)
    4343            throws UnsupportedFlavorException, IOException {
    44         PrimitiveTagTransferData data = (PrimitiveTagTransferData) support.getTransferable().getTransferData(df);
     44        Object o = support.getTransferable().getTransferData(df);
     45        if (!(o instanceof PrimitiveTagTransferData))
     46            return false;
     47        PrimitiveTagTransferData data = (PrimitiveTagTransferData) o;
    4548
    4649        TagPasteSupport tagPaster = new TagPasteSupport(data, selection);
Note: See TracChangeset for help on using the changeset viewer.