Remove getComment and getVersion methods

MSAL

Jakarta Servlet methods have been deprecated for removal in Jakarta Servlet 6.0 to align with RFC 6265. In addition, the behavior of these methods has been changed so the setters no longer have any effect, the getComment methods return null, and the getVersion method returns 0. The deprecated methods are removed.

org.openrewrite.java.migrate.jakarta.ServletCookieBehaviorChangeRFC6265
mod run . --recipe=org.openrewrite.java.migrate.jakarta.ServletCookieBehaviorChangeRFC6265

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

Recipe list

It runs these recipes, in this order.

  1. Remove method invocations jakarta.servlet.http.Cookie getComment()
  2. Remove method invocations jakarta.servlet.http.Cookie getVersion()
  3. Remove method invocations jakarta.servlet.http.Cookie setComment(String)
  4. Remove method invocations jakarta.servlet.http.Cookie setVersion(int)
  5. Remove method invocations jakarta.servlet.SessionCookieConfig getComment()
  6. Remove method invocations jakarta.servlet.SessionCookieConfig setComment(String)