Skip to content

Commit 689782c

Browse files
committed
Make ProblemDetail Serializable
This commit makes the `ProblemDetail` type implement `Serializable` in order to be serialized and shared in distributed systems. Closes gh-34409
1 parent 2df90e3 commit 689782c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

spring-web/src/main/java/org/springframework/http/ProblemDetail.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
1616

1717
package org.springframework.http;
1818

19+
import java.io.Serializable;
1920
import java.net.URI;
2021
import java.util.LinkedHashMap;
2122
import java.util.Map;
@@ -49,7 +50,9 @@
4950
* @see org.springframework.web.ErrorResponse
5051
* @see org.springframework.web.ErrorResponseException
5152
*/
52-
public class ProblemDetail {
53+
public class ProblemDetail implements Serializable {
54+
55+
private static final long serialVersionUID = 3307761915842206538L;
5356

5457
private static final URI BLANK_TYPE = URI.create("about:blank");
5558

0 commit comments

Comments
 (0)