Skip to content

Commit

Permalink
#63: Fixed serialization of duplicate java.time.* instances
Browse files Browse the repository at this point in the history
  • Loading branch information
apangin committed Nov 27, 2022
1 parent b64852e commit dbe4ca5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/one/nio/serial/JavaTimeSerializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ public void write(Object obj, DataStream out) throws IOException {
@Override
public Object read(DataStream in) throws IOException, ClassNotFoundException {
try {
return readExternal.invokeExact((DataInput) in);
Object result = readExternal.invokeExact((DataInput) in);
in.register(result);
return result;
} catch (IOException e) {
throw e;
} catch (Throwable e) {
Expand Down

0 comments on commit dbe4ca5

Please sign in to comment.