首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >DLS_DEAD_LOCAL_STORE SuppressWarnings FindBugs误报

DLS_DEAD_LOCAL_STORE SuppressWarnings FindBugs误报
EN

Stack Overflow用户
提问于 2013-07-23 06:34:15
回答 3查看 14.1K关注 0票数 11

我在试着排除DLS_DEAD_LOCAL_STORE的假阳性

这是我到目前为止尝试过的方法:

代码语言:javascript
运行
复制
@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。

EN

Stack Overflow用户

发布于 2016-07-27 22:48:43

显然,Sun/Oracle的As explained in FindBugs documentation编译器经常为final局部变量生成死存储。这些DLS_DEAD_LOCAL_STORE警告不能轻易抑制。

但是,我不确定为什么XML过滤器可以工作(就像在公认的答案中一样)。

票数 3
EN
查看全部 3 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17798612

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档