Sho SHIMIZU
Committed by Gerrit Code Review

Create constructors with zero argument for serialization

Change-Id: I503197a2dcfe1b71dc6a82d4c2ca4512465200c5
......@@ -44,6 +44,12 @@ public class DefaultResource<S, T> implements Resource<S, T> {
this.resource = checkNotNull(resource);
}
// for serialization
private DefaultResource() {
this.subject = null;
this.resource = null;
}
@Override
public S subject() {
return subject;
......
......@@ -47,6 +47,13 @@ public class DefaultResourceAllocation<S, T> implements ResourceAllocation<S, T>
this.consumer = consumer;
}
// for serialization
private DefaultResourceAllocation() {
this.subject = null;
this.resource = null;
this.consumer = null;
}
@Override
public S subject() {
return subject;
......