Skip to content
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

ResourceException: avoid NotSerializableException #1403

Merged
merged 2 commits into from
Jan 26, 2024
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 @@ -30,21 +30,26 @@

/**
* Encapsulates a response status and the optional cause as a checked exception.
*
* <p>
* Note that this class must implement java.io.Serializable, because it extends
* RuntimeException. To avoid warnings, it provides a serialVersionUID and has
* its non-serializable fields marked transient. The default serialization thus
* obtained is minimal, and may not be what the user expects.
*
* @author Jerome Louvel
*/
public class ResourceException extends RuntimeException {

private static final long serialVersionUID = 1L;

/** The status associated to this exception. */
private final Status status;
private final transient Status status;

/** The request associated to this exception. Could be null. */
private final Request request;
private final transient Request request;

/** The response associated to this exception. Could be null. */
private final Response response;
private final transient Response response;

/**
* Constructor.
Expand Down