• FindBugs Tutorial


    FindBugs is an useful tool that can find potential problematic code in your Java program. It differs from CheckStyle and PMD in that it analyzes Java bytecode, not the human-readable source file, to find potential bug patterns. Follow this tutorial to see how to use FindBugs in Eclipse!

    1. In Eclipse, click Help -> Install new software. In the opened dialogue, click "Add". Type in FindBugs as the name and "http://findbugs.cs.umd.edu/eclipse" as the URL. Click "OK" to proceed.

    2. Select "FindBugs" and click "Next"

    3. Eclipse will begin downloading the software. Agree to any prompted licenses or user agreements to proceed.

    4.  Right-click the project, select Find Bugs -> Find Bugs in the context menu.

    5. Wait a few seconds/minutes while it checks your project

    6. When finished, it will report how many bugs it has found. Click "yes" to open the FindBugs perspective to view the bugs.

    7. In the Bug Explorer window, you can see a summary of the bugs found.

    8. Double click one bug to see exactly which line is problematic. Here it says two strings should be compared with the "equals()" method, not the  "==" operator.

     9. Make changes accordingly, and check again to make sure there are no more bugs.

    That's all for this tutorial. Hopefully you'll find it useful. More information about FindBugs can be found at http://findbugs.sourceforge.net/.

    Feedbacks and suggestions are greatly appreciated.

  • 相关阅读:
    python 闭包
    并行【parallel】和并发【concurrency】线程是并发还是并行,进程是并发还是并行
    生成器,送代器的区别
    深拷贝和浅拷贝的区别
    对缺省参数的理解
    对不定长参数的理解
    mysql三范式
    mysql基础查询语法
    mysql常见查询练习题
    Ubantu-Nginx部署
  • 原文地址:https://www.cnblogs.com/tuhz/p/4521066.html
Copyright © 2020-2023  润新知