Reading the source code for the Instant class, I came across this method
private void readObject(ObjectInputStream s) throws InvalidObjectException { throw new InvalidObjectException("Deserialization via serialization delegate"); }
I became interested. What is a malicious thread? And how does this method protect it?
java stream java-8 java-time
Luigi cortese
source share