码迷,mamicode.com
首页 > 数据库 > 详细

Eclipse 代码检测报 Potential null pointer access: The variable XX may be null at this location

时间:2015-04-09 15:34:27      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:eclipse自动检测代码   空指针   potential null point   


对于这种本来是挺好的一功能,瞬间感觉好强大啊有木有,还会自动帮你检测空指针。

技术分享

可是在看别人代码,或者服务器代码的时候就蛋疼了啊!这不改编译就过不了啊!


其实如果想去掉这种检测非常简单。一个设置的问题。

Eclipse——>Window——>preferences——>java——>Compiler——>Errors/Warnings,找到下面这个选项

技术分享


看到了吗?把Error改成warning 将项目重新clean 一下。OK!

Eclipse 代码检测报 Potential null pointer access: The variable XX may be null at this location

标签:eclipse自动检测代码   空指针   potential null point   

原文地址:http://blog.csdn.net/lisineng/article/details/44959975

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!