Changeset 9891 in josm for trunk/src/org


Ignore:
Timestamp:
2016-02-27T19:30:02+01:00 (9 years ago)
Author:
simon04
Message:

see #12300 - Make Drag and Drop work between different JOSM instances

Location:
trunk/src/org/openstreetmap/josm
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/NodeData.java

    r8510 r9891  
    99public class NodeData extends PrimitiveData implements INode {
    1010
     11    private static final long serialVersionUID = 5626323599550908773L;
    1112    /*
    1213     * we "inline" lat/lon coordinates instead of using a LatLon => reduces memory footprint
  • trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java

    r8510 r9891  
    22package org.openstreetmap.josm.data.osm;
    33
     4import java.io.Serializable;
    45import java.util.ArrayList;
    56import java.util.Arrays;
     
    1516 * reported by events
    1617 */
    17 public abstract class PrimitiveData extends AbstractPrimitive {
     18public abstract class PrimitiveData extends AbstractPrimitive implements Serializable {
     19
     20    private static final long serialVersionUID = -1044837092478109138L;
    1821
    1922    /**
  • trunk/src/org/openstreetmap/josm/data/osm/RelationData.java

    r8415 r9891  
    99public class RelationData extends PrimitiveData implements IRelation {
    1010
     11    private static final long serialVersionUID = 1163664954890478565L;
    1112    private List<RelationMemberData> members = new ArrayList<>();
    1213
  • trunk/src/org/openstreetmap/josm/data/osm/RelationMemberData.java

    r9371 r9891  
    22package org.openstreetmap.josm.data.osm;
    33
     4import java.io.Serializable;
    45import java.util.Objects;
    56
    6 public class RelationMemberData implements PrimitiveId {
     7public class RelationMemberData implements PrimitiveId, Serializable {
    78
     9    private static final long serialVersionUID = 381392198209333319L;
    810    private final String role;
    911    private final long memberId;
  • trunk/src/org/openstreetmap/josm/data/osm/WayData.java

    r8415 r9891  
    99public class WayData extends PrimitiveData implements IWay {
    1010
     11    private static final long serialVersionUID = 106944939313286415L;
    1112    private List<Long> nodes = new ArrayList<>();
    1213
  • trunk/src/org/openstreetmap/josm/gui/datatransfer/PrimitiveTransferable.java

    r9711 r9891  
    55import java.awt.datatransfer.Transferable;
    66import java.awt.datatransfer.UnsupportedFlavorException;
     7import java.io.Serializable;
    78import java.util.ArrayList;
    89import java.util.Collection;
     
    1112import org.openstreetmap.josm.data.osm.PrimitiveData;
    1213import org.openstreetmap.josm.gui.DefaultNameFormatter;
     14import org.openstreetmap.josm.tools.CheckParameterUtil;
    1315
    1416/**
     
    2123     * A wrapper for a collection of {@link PrimitiveData}.
    2224     */
    23     public static final class Data {
     25    public static final class Data implements Serializable {
     26        private static final long serialVersionUID = -1485089993600213704L;
    2427        private final Collection<PrimitiveData> primitiveData;
    2528
    2629        private Data(Collection<PrimitiveData> primitiveData) {
     30            CheckParameterUtil.ensureThat(primitiveData instanceof Serializable, "primitiveData must be instanceof Serializable");
    2731            this.primitiveData = primitiveData;
    2832        }
  • trunk/src/org/openstreetmap/josm/gui/datatransfer/RelationMemberTransferable.java

    r9711 r9891  
    55import java.awt.datatransfer.Transferable;
    66import java.awt.datatransfer.UnsupportedFlavorException;
     7import java.io.Serializable;
    78import java.util.ArrayList;
    89import java.util.Collection;
     
    1112import org.openstreetmap.josm.data.osm.RelationMemberData;
    1213import org.openstreetmap.josm.gui.DefaultNameFormatter;
     14import org.openstreetmap.josm.tools.CheckParameterUtil;
    1315
    1416/**
     
    2123     * A wrapper for a collection of {@link RelationMemberData}.
    2224     */
    23     public static final class Data {
     25    public static final class Data implements Serializable {
     26        private static final long serialVersionUID = -8432393711635811029L;
    2427        private final Collection<RelationMemberData> relationMemberDatas;
    2528
    2629        private Data(Collection<RelationMemberData> primitiveData) {
     30            CheckParameterUtil.ensureThat(primitiveData instanceof Serializable, "primitiveData must be instanceof Serializable");
    2731            this.relationMemberDatas = primitiveData;
    2832        }
Note: See TracChangeset for help on using the changeset viewer.