Replace doUpgrade(..) with ServerContainer.upgradeHttpToWebSocket(..)

MSAL

Deprecated WsWsocServerContainer.doUpgrade(..) is replaced by the Jakarta WebSocket 2.1 specification ServerContainer.upgradeHttpToWebSocket(..).

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

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. Change method name com.ibm.websphere.wsoc.WsWsocServerContainer doUpgrade(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, com.ibm.websphere.wsoc.ServerEndpointConfig, java.util.Map) to upgradeHttpToWebSocket
  2. Change type WsWsocServerContainer to ServerContainer