Archiviert
13
0

The serializer can be null

But this will cause issues when trying to register objects
Dieser Commit ist enthalten in:
Dan Mulloy 2016-03-05 23:53:55 -05:00
Ursprung 11ba322b5f
Commit 7077037bb7

Datei anzeigen

@ -542,9 +542,9 @@ public class WrappedDataWatcher extends AbstractWrapper implements Iterable<Wrap
}
/**
* Gets this watcher object's serializer.
* Gets this watcher object's serializer. Will return null if the serializer was never specified.
*
* @return The serializer
* @return The serializer, or null
*/
public Serializer getSerializer() {
if (getSerializer == null) {
@ -553,13 +553,16 @@ public class WrappedDataWatcher extends AbstractWrapper implements Iterable<Wrap
}
Object serializer = getSerializer.invoke(handle);
if (serializer != null) {
Serializer wrapper = Registry.fromHandle(serializer);
if (wrapper != null) {
return wrapper;
} else {
return new Serializer(null, serializer, false);
}
} else {
return null;
}
}
@Override