如果無法修改Event接口,如何重構以下方法? PMD報告太複雜,findbugs報告ITC_INHERITANCE_TYPE_CHECKING。還有幻數,如3,4,5等。 public int getEventCode(Event event) {
if (event instanceof OneEvent) {
return 1;
}
if (e
我試圖消除假陽性DLS_DEAD_LOCAL_STORE 這是我迄今爲止嘗試: @SuppressWarnings("DLS_DEAD_LOCAL_STORE")
@edu.umd.cs.findbugs.annotations.SuppressWarnings("DLS_DEAD_LOCAL_STORE") (基於SuppressWarnings not working on FindBug