Index: trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 19095)
+++ trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 19096)
@@ -4,7 +4,4 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
 import java.text.MessageFormat;
 import java.time.Instant;
@@ -143,5 +140,5 @@
      * Other bits of this field are used in subclasses.
      */
-    private volatile short flags = FLAG_VISIBLE;   // visible per default
+    protected volatile short flags = FLAG_VISIBLE;   // visible per default
 
     /**
@@ -372,36 +369,4 @@
         updateFlags(flag, value);
         return oldFlags != flags;
-    }
-
-    /**
-     * Write common data to a serialization stream. At time of writing, this should <i>only</i> be used by {@link PrimitiveData}.
-     * @param oos The output stream to write to
-     * @throws IOException see {@link ObjectOutputStream#write}
-     */
-    protected void writeObjectCommon(ObjectOutputStream oos) throws IOException {
-        oos.writeLong(id);
-        oos.writeLong(user == null ? -1 : user.getId());
-        oos.writeInt(version);
-        oos.writeInt(changesetId);
-        oos.writeInt(timestamp);
-        oos.writeObject(keys);
-        oos.writeShort(flags);
-    }
-
-    /**
-     * Read common data from a serialization stream. At time of writing, this should <i>only</i> be used by {@link PrimitiveData}.
-     * @param ois The serialization stream to read from
-     * @throws ClassNotFoundException see {@link ObjectInputStream#readObject()}
-     * @throws IOException see {@link ObjectInputStream#read}
-     */
-    protected void readObjectCommon(ObjectInputStream ois) throws ClassNotFoundException, IOException {
-        id = ois.readLong();
-        final long userId = ois.readLong();
-        user = userId == -1 ? null : User.getById(userId);
-        version = ois.readInt();
-        changesetId = ois.readInt();
-        timestamp = ois.readInt();
-        keys = (String[]) ois.readObject();
-        flags = ois.readShort();
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java	(revision 19095)
+++ trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java	(revision 19096)
@@ -84,12 +84,23 @@
 
     private void writeObject(ObjectOutputStream oos) throws IOException {
-        // since super class is not Serializable
-        super.writeObjectCommon(oos);
+        oos.writeLong(id);
+        oos.writeLong(user == null ? -1 : user.getId());
+        oos.writeInt(version);
+        oos.writeInt(changesetId);
+        oos.writeInt(timestamp);
+        oos.writeObject(keys);
+        oos.writeShort(flags);
         oos.defaultWriteObject();
     }
 
     private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
-        // since super class is not Serializable
-        super.readObjectCommon(ois);
+        id = ois.readLong();
+        final long userId = ois.readLong();
+        user = userId == -1 ? null : User.getById(userId);
+        version = ois.readInt();
+        changesetId = ois.readInt();
+        timestamp = ois.readInt();
+        keys = (String[]) ois.readObject();
+        flags = ois.readShort();
         ois.defaultReadObject();
     }
