private static final class Proxy implements Externalizable {
@Serial
private static final long serialVersionUID = 1L;
+
private byte[] serialized;
// checkstyle flags the public modifier as redundant however it is explicitly needed for Java serialization to
in.readFully(serialized);
}
+ @Serial
private Object readResolve() {
// TODO: consider caching instances here
return new FrontendType(new String(serialized, StandardCharsets.UTF_8), serialized);
return local;
}
+ @Serial
Object writeReplace() {
return new Proxy(getSerialized());
}