Changeset 10946 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2016-09-03T20:01:46+02:00 (4 years ago)
Author:
Don-vip
Message:

fix #13395 - fix serialization issue causing bugs in copy/paste

File:
1 edited

Legend:

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

    r10868 r10946  
    3030    }
    3131
     32    /**
     33     * Constructs a new {@code PrimitiveData} from an existing one.
     34     * @param data the data to copy
     35     */
    3236    public PrimitiveData(PrimitiveData data) {
    3337        cloneFrom(data);
    3438    }
    3539
     40    /**
     41     * Sets the primitive identifier.
     42     * @param id primitive identifier
     43     */
    3644    public void setId(long id) {
    3745        this.id = id;
    3846    }
    3947
     48    /**
     49     * Sets the primitive version.
     50     * @param version primitive version
     51     */
    4052    public void setVersion(int version) {
    4153        this.version = version;
     
    5062    }
    5163
     64    /**
     65     * Returns a copy of this primitive data.
     66     * @return a copy of this primitive data
     67     */
    5268    public abstract PrimitiveData makeCopy();
    5369
     
    8298        oos.writeInt(timestamp);
    8399        oos.writeObject(keys);
     100        oos.writeShort(flags);
    84101        oos.defaultWriteObject();
    85102    }
     
    94111        timestamp = ois.readInt();
    95112        keys = (String[]) ois.readObject();
     113        flags = ois.readShort();
    96114        ois.defaultReadObject();
    97115    }
Note: See TracChangeset for help on using the changeset viewer.