Oliver Drotbohm opened SPR-11917 and commented
HttpHeaders headers = new HttpHeaders();
headers.setAllow(Collections.<HttpMethod> emptySet());
headers.getAllow();
This throws an exception during the accessor call, as it can't create an HttpMethod instance from the empty String. It should rather return an empty Set instead.
java.lang.IllegalArgumentException: No enum constant org.springframework.http.HttpMethod.
at java.lang.Enum.valueOf(Enum.java:236)
at org.springframework.http.HttpMethod.valueOf(HttpMethod.java:27)
at org.springframework.http.HttpHeaders.getAllow(HttpHeaders.java:229)
…
Affects: 3.2.9, 4.0.5
Backported to: 3.2.10