Quick, but important, footnote to this series.
I discovered some serialization problems related to this technique due to the GetMap being transient.
The fix is to replace this:
with this:
I discovered some serialization problems related to this technique due to the GetMap being transient.
The fix is to replace this:
transient private GetMap<boolean> readOnlyGetter = new GetMap<boolean>() {
public GetMap<boolean> getReadOnly() {
@Override
public Boolean get(final Object key) {
}public Boolean get(final Object key) {
if(null==unid || !(unid instanceof String)){
return isReadOnly(key);
throw new IllegalArgumentException();
}public GetMap<boolean> getReadOnly() {
return readOnlyGetter;
}
with this:
public GetMap<boolean> getReadOnly() {
readOnlyGetter = new GetMap<boolean>() {
return readOnlyGetter;
}
@Override
public Boolean get(final Object key) {
}public Boolean get(final Object key) {
if(null==unid || !(unid instanceof String)){
return isReadOnly(key);
throw new IllegalArgumentException();
}return readOnlyGetter;
Comments
Post a Comment