@@ -52,7 +52,9 @@ public class HttpRequestMethodNotSupportedException extends ServletException imp
52
52
/**
53
53
* Create a new HttpRequestMethodNotSupportedException.
54
54
* @param method the unsupported HTTP request method
55
+ * @deprecated 6.0 in favor of {@link #HttpRequestMethodNotSupportedException(String, Collection)}
55
56
*/
57
+ @ Deprecated (since = "6.0" , forRemoval = true )
56
58
public HttpRequestMethodNotSupportedException (String method ) {
57
59
this (method , (String []) null );
58
60
}
@@ -61,15 +63,17 @@ public HttpRequestMethodNotSupportedException(String method) {
61
63
* Create a new HttpRequestMethodNotSupportedException.
62
64
* @param method the unsupported HTTP request method
63
65
* @param msg the detail message
66
+ * @deprecated in favor of {@link #HttpRequestMethodNotSupportedException(String, Collection)}
64
67
*/
68
+ @ Deprecated (since = "6.0" , forRemoval = true )
65
69
public HttpRequestMethodNotSupportedException (String method , String msg ) {
66
70
this (method , null , msg );
67
71
}
68
72
69
73
/**
70
74
* Create a new HttpRequestMethodNotSupportedException.
71
75
* @param method the unsupported HTTP request method
72
- * @param supportedMethods the actually supported HTTP methods (may be {@code null})
76
+ * @param supportedMethods the actually supported HTTP methods (possibly {@code null})
73
77
*/
74
78
public HttpRequestMethodNotSupportedException (String method , @ Nullable Collection <String > supportedMethods ) {
75
79
this (method , (supportedMethods != null ? StringUtils .toStringArray (supportedMethods ) : null ));
@@ -78,8 +82,10 @@ public HttpRequestMethodNotSupportedException(String method, @Nullable Collectio
78
82
/**
79
83
* Create a new HttpRequestMethodNotSupportedException.
80
84
* @param method the unsupported HTTP request method
81
- * @param supportedMethods the actually supported HTTP methods (may be {@code null})
85
+ * @param supportedMethods the actually supported HTTP methods (possibly {@code null})
86
+ * @deprecated in favor of {@link #HttpRequestMethodNotSupportedException(String, Collection)}
82
87
*/
88
+ @ Deprecated (since = "6.0" , forRemoval = true )
83
89
public HttpRequestMethodNotSupportedException (String method , @ Nullable String [] supportedMethods ) {
84
90
this (method , supportedMethods , "Request method '" + method + "' is not supported" );
85
91
}
@@ -89,7 +95,9 @@ public HttpRequestMethodNotSupportedException(String method, @Nullable String[]
89
95
* @param method the unsupported HTTP request method
90
96
* @param supportedMethods the actually supported HTTP methods
91
97
* @param msg the detail message
98
+ * @deprecated in favor of {@link #HttpRequestMethodNotSupportedException(String, Collection)}
92
99
*/
100
+ @ Deprecated (since = "6.0" , forRemoval = true )
93
101
public HttpRequestMethodNotSupportedException (String method , @ Nullable String [] supportedMethods , String msg ) {
94
102
super (msg );
95
103
this .method = method ;
@@ -153,4 +161,9 @@ public ProblemDetail getBody() {
153
161
return this .body ;
154
162
}
155
163
164
+ @ Override
165
+ public Object [] getDetailMessageArguments () {
166
+ return new Object [] {getMethod (), getSupportedHttpMethods ()};
167
+ }
168
+
156
169
}
0 commit comments