【发布时间】:2012-07-27 16:29:48
【问题描述】:
考虑以下代码:
public void broadcast(FacesEvent event)
throws AbortProcessingException {
if(!(event instanceof WrapperEvent)) {
super.broadcast(event);
return;
}
// Sets up the correct context and fire our wrapped event.
GridWrapperEvent revent = (GridWrapperEvent)event; // FindBugs is complaining here
int oldRowIndex = getRowIndex();
int oldColumnIndex = getColumnIndex();
boolean oldClientIdRewritting = clientIdRewritting;
setClientIdRewritting(revent.isClientIdRewritting());
setActiveCell(revent.getRowIndex(), revent.getColumnIndex());
FacesEvent rowEvent = revent.getFacesEvent();
rowEvent.getComponent().broadcast(rowEvent);
setActiveCell(oldRowIndex, oldColumnIndex);
setClientIdRewritting(oldClientIdRewritting);
}
FindBugs 正在抱怨注释行。有什么我可以做的吗? FindBugs 是这么说的:
未经检查/未经确认的演员表 这个演员表是未经检查的,而不是全部 被转换的类型的实例可以被转换为它正在被转换的类型 投到。确保您的程序逻辑确保此转换将 不会失败。
【问题讨论】: