Skip to content

FacesManagedBeansRemoved for Faces 4.0 recipe updates #1023

@evie-lau

Description

@evie-lau

Faces 4.0 recipe - FacesManagedBeansRemoved - needs additions

I found a few things the org.openrewrite.java.migrate.jakarta.FacesManagedBeansRemoved recipe is missing.

Reference documents

Missing fixes

1. CustomScoped

Image
  • java.faces.bean.CustomScoped and jakarta.faces.bean.CustomScoped seem to need a custom recipe to use CDI custom scopes and jakarta.enterprise.context.spi.Context. Unsure of recipe scope, and if feasible.

Migration case with build error:

[ERROR] ... package jakarta.faces.bean does not exist
[ERROR] ... cannot find symbol
[ERROR]   symbol: class CustomScoped

Additional analysis: #1025 (comment)

Problem: jakarta.faces.bean.CustomScoped was removed in Faces 4.0 with no direct replacement. The CDI equivalent involves defining a custom scope annotation with @NormalScope or @Scope, plus registering a Context implementation — this is NOT a simple ChangeType.

Status: This would require a custom Java recipe and the migration path isn't mechanical (the issue author also notes "unsure of recipe scope, and if feasible"). Skipping for now.

✅ 2. ManagedProperty name - fixed in #1025/#1027

Faces 3.0 ManagedProperty doc
Faces 4.0 ManagedProperty doc

  • name was an optional element in Faces 3.0, and removed in Faces 4.0. Possibly remove entirely unless there is another migration path to maintain functionality.

Migration case with build error:

[ERROR] ... cannot find symbol
[ERROR]   symbol:   method name()
[ERROR]   location: @interface jakarta.faces.annotation.ManagedProperty

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Recipes Wanted

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions