Skip to content

Refresh test entity class. #1645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,6 @@
@Document(expiry = 1, touchOnRead = true)
public class UserAnnotatedTouchOnRead extends User implements Serializable {

JsonNode custom = new ObjectNode(JsonNodeFactory.instance);
private void writeObject(ObjectOutputStream out) throws IOException {
out.defaultWriteObject();
if(custom== null){
out.writeBoolean(false);
} else {
out.writeBoolean(true);
new ObjectMapper().configure(JsonGenerator.Feature.AUTO_CLOSE_TARGET, false).writeValue((OutputStream)out, custom);
}
}

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
if(in.readBoolean()){
this.custom = new ObjectMapper().configure(JsonParser.Feature.AUTO_CLOSE_SOURCE, false).readValue((InputStream)in, JsonNode.class);
}
}
public UserAnnotatedTouchOnRead(String id, String firstname, String lastname) {
super(id, firstname, lastname);
}
Expand Down