Removed Jakarta Faces UIComponent Constants

This rule flags any reference to the jakarta.faces.component.UIComponent.CURRENT_COMPONENT and CURRENT_COMPOSITE_COMPONENT constants. The jakarta.faces.component.UIComponent.getCurrentComponent() and getCurrentCompositeComponent() methods were added in JSF 2.0 when the jakarta.faces.component.UIComponent.CURRENT_COMPONENT and CURRENT_COMPOSITE_COMPONENT constants were introduced. The ability to access these fields through both the constants and methods caused confusion. Replace any usage of CURRENT_COMPONENT and CURRENT_COMPOSITE_COMPONENT with getCurrentComponent() and getCurrentCompositeComponent() respectively.

This rule has an automated fix to update the use of these constants with the appropriate methods. Copy the custom configuration to your application build file to enable the fix automation.

For more Jakarta 10 migration information, see Differences between Jakarta Faces 4.0 and 3.0.