Istvan Ratkai opened SPR-15377 and commented
You can create an object without supportedMethod array.
public HttpRequestMethodNotSupportedException(String method) {
this(method, (String[]) null);
}
However when getSupportedHttpMethods() is called there is no null-check for this.supportedMethods in it:
public Set<HttpMethod> getSupportedHttpMethods() {
List<HttpMethod> supportedMethods = new LinkedList<HttpMethod>();
for (String value : this.supportedMethods) {
HttpMethod resolved = HttpMethod.resolve(value);
if (resolved != null) {
supportedMethods.add(resolved);
}
}
return EnumSet.copyOf(supportedMethods);
}
Affects: 4.3.7