Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java
r9891 r9994 2 2 package org.openstreetmap.josm.data.osm; 3 3 4 import java.io.IOException; 5 import java.io.ObjectInputStream; 6 import java.io.ObjectOutputStream; 4 7 import java.io.Serializable; 5 8 import java.util.ArrayList; … … 73 76 @Override 74 77 public abstract OsmPrimitiveType getType(); 78 79 private void writeObject(ObjectOutputStream oos) throws IOException { 80 // since super class is not Serializable 81 oos.writeLong(id); 82 oos.writeLong(user == null ? -1 : user.getId()); 83 oos.writeInt(version); 84 oos.writeInt(changesetId); 85 oos.writeInt(timestamp); 86 oos.defaultWriteObject(); 87 } 88 89 private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException { 90 // since super class is not Serializable 91 id = ois.readLong(); 92 final long userId = ois.readLong(); 93 user = userId == -1 ? null : User.getById(userId); 94 version = ois.readInt(); 95 changesetId = ois.readInt(); 96 timestamp = ois.readInt(); 97 ois.defaultReadObject(); 98 } 75 99 }
Note:
See TracChangeset
for help on using the changeset viewer.