Disambiguate null headers in HttpEntity, RequestEntity and ResponseEntity constructors

Proprietary

Spring Framework 7.0 added HttpHeaders overloads next to the MultiValueMap ones on the HttpEntity, RequestEntity and ResponseEntity constructors, and HttpHeaders no longer implements MultiValueMap, so a null literal passed as headers no longer compiles. A null that was the only headers argument, as in new ResponseEntity<>(null, HttpStatus.NOT_FOUND), is removed, which selects the constructor without headers. Any other null headers argument is cast to (HttpHeaders) null.

io.moderne.java.spring.framework7.MigrateNullHttpHeadersArgument
mod run . --recipe=io.moderne.java.spring.framework7.MigrateNullHttpHeadersArgument

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.