@@ -224,6 +224,8 @@ description: >-
224224 This recipe substitutes Faces Managed Beans, which were deprecated in JavaServer Faces 2.3 and have been removed from Jakarta Faces 4.0.
225225preconditions :
226226 - org.openrewrite.Singleton
227+ # Previous Faces 3.0 docs show new replacements: https://jakarta.ee/specifications/faces/3.0/apidocs/jakarta/faces/bean/package-summary
228+ # Additional docs: https://docs.redhat.com/en/documentation/red_hat_jboss_enterprise_application_platform/8.0/html/migration_guide/application-migration-from-jakarta-ee-8-to-ee-10_default#faces-managed-beans_default
227229recipeList :
228230 - org.openrewrite.java.ChangeType :
229231 oldFullyQualifiedTypeName : javax.faces.bean.ApplicationScoped
@@ -233,10 +235,16 @@ recipeList:
233235 oldFullyQualifiedTypeName : jakarta.faces.bean.ApplicationScoped
234236 newFullyQualifiedTypeName : jakarta.enterprise.context.ApplicationScoped
235237 ignoreDefinition : true
238+ # Refer to https://github.com/openrewrite/rewrite-migrate-java/issues/1023
239+ # TODO: CustomScoped is replaced by Context, but not straightforward ChangeType. Custom recipe for @CustomScoped to use CDI custom scopes
240+ # Docs: https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0.html#defining_new_scope_type
236241 - org.openrewrite.java.ChangeType :
237242 oldFullyQualifiedTypeName : javax.faces.bean.ManagedProperty
238243 newFullyQualifiedTypeName : jakarta.faces.annotation.ManagedProperty
239244 ignoreDefinition : true
245+ - org.openrewrite.java.RemoveAnnotationAttribute :
246+ annotationType : jakarta.faces.annotation.ManagedProperty
247+ attributeName : name
240248 - org.openrewrite.java.ChangeType :
241249 oldFullyQualifiedTypeName : jakarta.faces.bean.ManagedProperty
242250 newFullyQualifiedTypeName : jakarta.faces.annotation.ManagedProperty
@@ -249,6 +257,7 @@ recipeList:
249257 oldFullyQualifiedTypeName : jakarta.faces.bean.NoneScoped
250258 newFullyQualifiedTypeName : jakarta.enterprise.context.Dependent
251259 ignoreDefinition : true
260+ # ReferencedBean has no replacement, was never widely adopted
252261 - org.openrewrite.java.ChangeType :
253262 oldFullyQualifiedTypeName : javax.faces.bean.RequestScoped
254263 newFullyQualifiedTypeName : jakarta.enterprise.context.RequestScoped
0 commit comments