Project.NameKey: Implement Serializable
Prior to Ic46c4a357 the Project.NameKey class extended StringKey and was implicitly serializable because StringKey implements Serializable. After Ic46c4a357, Project.NameKey is no longer serializable, which causes an IllegalStateException when attempting to bind a cache that uses JavaCacheSerializer with Project.NameKey as key or value. Add back the Serializable interface and add a test to make sure it is serializable by JavaCacheSerializer. Bug: Issue 11793 Change-Id: Id465c3a4cd810de477fb86a13185ec452d5d3a40
This commit is contained in:
@@ -18,6 +18,8 @@ import com.google.gerrit.entities.Project;
|
||||
|
||||
/** Special name of the project that all projects derive from. */
|
||||
public class AllProjectsName extends Project.NameKey {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public AllProjectsName(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
@@ -18,6 +18,8 @@ import com.google.gerrit.entities.Project;
|
||||
|
||||
/** Special name of the project in which meta data for all users is stored. */
|
||||
public class AllUsersName extends Project.NameKey {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public AllUsersName(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
Reference in New Issue
Block a user