Migrate HttpHeaders methods removed when MultiValueMap contract was dropped

Proprietary

Spring Framework 7.0 changed HttpHeaders to no longer implement MultiValueMap. This recipe replaces removed inherited method calls: containsKey() with containsHeader(), keySet() with headerNames(), entrySet() with headerSet(), addIfAbsent(name, value) with a containsHeader check around add, and the static writableHttpHeaders(headers) with new HttpHeaders(headers).

io.moderne.java.spring.framework.MigrateHttpHeadersMultiValueMapMethods
mod run . --recipe=io.moderne.java.spring.framework.MigrateHttpHeadersMultiValueMapMethods

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