Skip to content

Commit bd029b9

Browse files
committed
Ensure RestClientResponseException is serializable
Closes gh-30224
1 parent 5f22648 commit bd029b9

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

spring-web/src/main/java/org/springframework/web/client/RestClientResponseException.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2023 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.
@@ -54,8 +54,7 @@ public class RestClientResponseException extends RestClientException {
5454
private final String responseCharset;
5555

5656
@Nullable
57-
@SuppressWarnings("serial")
58-
private Function<ResolvableType, ?> bodyConvertFunction;
57+
private transient Function<ResolvableType, ?> bodyConvertFunction;
5958

6059

6160
/**

spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClientResponseException.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public class WebClientResponseException extends WebClientException {
5858
@Nullable
5959
private transient final HttpRequest request;
6060

61-
@SuppressWarnings("MutableException")
6261
@Nullable
6362
private transient Function<ResolvableType, ?> bodyDecodeFunction;
6463

0 commit comments

Comments
 (0)