Skip to content

Commit

Permalink
Make KeyIndexedObject serializable, in order to allow correct seriali…
Browse files Browse the repository at this point in the history
…zation of its subclass UserProfile
  • Loading branch information
floscher committed Apr 15, 2017
1 parent 4baed6b commit 657f34c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
// License: GPL. For details, see LICENSE file.
package org.openstreetmap.josm.plugins.mapillary.model;

import java.io.Serializable;

/**
* An object that is identified amongst objects of the same class by a {@link String} key.
*/
public class KeyIndexedObject {
public class KeyIndexedObject implements Serializable {
private static final long serialVersionUID = 7762862623109416405L;
private final String key;

protected KeyIndexedObject(final String key) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
// License: GPL. For details, see LICENSE file.
package org.openstreetmap.josm.plugins.mapillary.model;

import java.io.Serializable;

import javax.swing.ImageIcon;

public class UserProfile extends KeyIndexedObject implements Serializable {
public class UserProfile extends KeyIndexedObject {
private static final long serialVersionUID = 4695718596660412790L;
private String username;
private ImageIcon avatar;
private final String username;
private final ImageIcon avatar;

public UserProfile(String key, String username, ImageIcon avatar) {
super(key);
Expand Down

0 comments on commit 657f34c

Please sign in to comment.