Replace deprecated StateManager methods

MSAL

Replace deprecated StateManager methods with saveView and restoreView. Faces 4.0 removed those from StateManager as well, so code that saves or restores views through it still needs a manual move to StateManagementStrategy.

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

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 *.faces.application.StateManager getComponentStateToSave(*.faces.context.FacesContext) to saveView
  2. Change method name *.faces.application.StateManager getTreeStructureToSave(*.faces.context.FacesContext) to saveView
  3. Change method name *.faces.application.StateManager restoreComponentState(*.faces.context.FacesContext,*.faces.component.UIViewRoot,String) to restoreView
  4. Change method name *.faces.application.StateManager restoreTreeStructure(*.faces.context.FacesContext,String,String) to restoreView
  5. Change method name *.faces.application.StateManager saveSerializedView(*.faces.context.FacesContext) to saveView