我在试着排除DLS_DEAD_LOCAL_STORE的假阳性
这是我到目前为止尝试过的方法:
@SuppressWarnings("DLS_DEAD_LOCAL_STORE")@edu.umd.cs.findbugs.annotations.SuppressWarnings("DLS_DEAD_LOCAL_STORE")
(基于SuppressWarnings not working on FindBugs)
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "DLS_DEAD_LOCAL_STORE", justification = "please go away")
基于http://osdir.com/ml/java-findbugs-general/2010-06/msg00017.html
但这些选择都无济于事。敬请指教。使用Eclipse Indigo。
发布于 2016-07-27 22:48:43
显然,Sun/Oracle的As explained in FindBugs documentation编译器经常为final局部变量生成死存储。这些DLS_DEAD_LOCAL_STORE警告不能轻易抑制。
但是,我不确定为什么XML过滤器可以工作(就像在公认的答案中一样)。
https://stackoverflow.com/questions/17798612
复制相似问题