Skip to content

Commit

Permalink
Merge 74d83a2 into 57e38d0
Browse files Browse the repository at this point in the history
  • Loading branch information
elrodro83 committed Sep 27, 2018
2 parents 57e38d0 + 74d83a2 commit d55e8a4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ public void write(final Kryo kryo, final Output output, final Object object) {
final SynchronizedCollection collection = SynchronizedCollection.valueOfType( object.getClass() );
// the ordinal could be replaced by s.th. else (e.g. a explicitely managed "id")
output.writeInt( collection.ordinal(), true );
kryo.writeClassAndObject( output, collection.sourceCollectionField.get( object ) );
synchronized (object) {
kryo.writeClassAndObject( output, collection.sourceCollectionField.get( object ) );
}
} catch ( final RuntimeException e ) {
// Don't eat and wrap RuntimeExceptions because the ObjectBuffer.write...
// handles SerializationException specifically (resizing the buffer)...
Expand Down

0 comments on commit d55e8a4

Please sign in to comment.