https://github.com/spring-projects/spring-framework/blob/7adeb461e0464b0d07c2e8fbe36ce0a22f0a7b5e/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java#L759
https://github.com/spring-projects/spring-framework/blob/7adeb461e0464b0d07c2e8fbe36ce0a22f0a7b5e/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java#L763
Comment From: jhoeller
That's just for convenient calling from several execute
variants where the inline call of RequestEntity.getMethod()
may return null
according to its static signature, even if for the use case at hand it needs to be non-null...