Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7052837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:25:54+00:00 2026-05-28T03:25:54+00:00

I am looking into using FindBugs to help find obvious bugs in my code.

  • 0

I am looking into using FindBugs to help find obvious bugs in my code.

I understand that any tool is limited in some ways, but the two most prevalent bugs I want to look for are:

  • NullPointerExceptions; and
  • Java memory leaks

Does FindBugs have the capabilities to find these? I’m sure one is never guaranteed to have all bugs uncovered, but it would be nice if FindBugs could detect even a fraction of them right there inside of Eclipse for me.

I have been reading the HTML manual and haven’t come across anything that mentions these capabilities.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:25:54+00:00Added an answer on May 28, 2026 at 3:25 am

    FindBugs uses static analysis to look for bugs in Java code. You could get good tips about improving your code, but it cannot guarantee you will detect memory leaks or NullPointerExceptions due to the runtime nature of both kind of problems. Certainly you will get very good tips about avoiding bad practices that could cause memory leaks and null pointers, but it is just a starting point.

    Also check this question about finding memory leaks in Java.

    The following Findbugs checks helps avoiding NullPointerException:

    • NP: Method with Boolean return type returns explicit null
    • NP: Clone method may return null
    • NP: equals() method does not check for null argument
    • NP: toString method may return null
    • NP: Null pointer dereference
    • NP: Null pointer dereference in method on exception path
    • NP: Method does not check for null argument
    • NP: close() invoked on a value that is always null
    • NP: Null value is guaranteed to be dereferenced
    • NP: Value is null and guaranteed to be dereferenced on exception path
    • NP: Method call passes null to a nonnull parameter
    • NP: Method may return null, but is declared @NonNull
    • NP: A known null value is checked to see if it is an instance of a type
    • NP: Possible null pointer dereference
    • NP: Possible null pointer dereference in method on exception path
    • NP: Method call passes null for nonnull parameter
    • NP: Method call passes null for nonnull parameter
    • NP: Non-virtual method call passes null for nonnull parameter
    • NP: Store of null value into field annotated NonNull
    • NP: Read of unwritten field
    • NP: Dereference of the result of readLine() without nullcheck
    • NP: Immediate dereference of the result of readLine()
    • NP: Load of known null value
    • NP: Possible null pointer dereference due to return value of called method
    • NP: Possible null pointer dereference on branch that might be infeasible
    • NP: Parameter must be nonnull but is marked as nullable
    • NP: Read of unwritten public or protected field

    Some checks about memory issues that will help improve your code are

    • Dm: Method invokes inefficient new String(String) constructor
    • Dm: Method invokes inefficient new String() constructor
    • Dm: Method invokes inefficient Boolean constructor; use Boolean.valueOf(…) instead
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was looking into using some .NET code from within a Delphi program, I
I am looking into using sprox but I can't seem to find any information
I was looking into the possibility of using CouchDB. I heard that it was
I'm looking into using Lua in a web project. I can't seem to find
I'm looking into using Jquery to replace some of our native Coldfusion ajax functionality.
I'm looking into using the Office Ribbon UI to help navigate around my application
I have recently started looking into using Azure but I'm having some issues getting
We are looking into using an ORM and I wanted some opinions/comparisons The basic
I'm looking into using ftplib (and possibly ftputil ) for doing some automated FTP
Looking into using the command line tool for KeyChain. I am able to do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.