此規則會標示 jakarta.faces.component.UIComponent.CURRENT_COMPONENT 及 CURRENT_COMPOSITE_COMPONENT 常數的任何參照。
引入
jakarta.faces.component.UIComponent.CURRENT_COMPONENT 及 CURRENT_COMPOSITE_COMPONENT 常數時,在 JSF 2.0 中新增了 jakarta.faces.component.UIComponent.getCurrentComponent() 及 getCurrentCompositeComponent() 方法。 透過常數和
方法來存取這些欄位的能力會造成混淆。 將使用的任何 CURRENT_COMPONENT 及 CURRENT_COMPOSITE_COMPONENT
分別取代為 getCurrentComponent () 及 getCurrentCompositeComponent()。
此規則具有自動化修正程式,可使用適當的方法來更新這些常數的使用。 將自訂配置複製到應用程式建置檔,以啟用修正程式自動化。
如需相關 Jakarta 10 移轉資訊,請參閱 Jakarta Faces 4.0 與 3.0 之間的差異。