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 7493855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:12:41+00:00 2026-05-29T17:12:41+00:00

Looking at the list of annotations in FindBugs 2.0 , I see that a

  • 0

Looking at the list of annotations in FindBugs 2.0, I see that a lot of them have been deprecated.

Some of these (@CheckForNull, @NonNull, etc.) have been deprecated because they have equivalent JSR-305 annotations. Good to finally settle the dilemma about which set of annotations to use.

But some FindBugs-specific annotations, such as @DefaultAnnotation and @DefaultAnnotationForFields, have also been deprecated and I cannot find any explanation of what to use in their place. I’m trying to migrate a codebase that makes heavy use of these annotations, and I’m a bit stuck.

I see that JSR-305 has @ParametersAreNonnullByDefault, which I could use to replace some instances of @DefaultAnnotationForParameters, but that will not cover all cases.

Am I missing something big here? Should I be using some kind of settings file or something, instead of annotations?

  • 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-29T17:12:42+00:00Added an answer on May 29, 2026 at 5:12 pm

    (note: see a related article at Should annotations in jar305.jar be preferred over similar annotations in annotation.jar for FindBugs? )

    From the author’s PDF (here), on page 51:

    JSR-305 will only define ParametersAreNonnullByDefault,
    but more can be defined outside of JSR-305

    • and can be interpreted by static analyzers
    that interpret JSR-305 annotations

    …so basically you can define it yourself, and give it the same name as the one you’re replacing, and it should end up working fine since FindBugs only runs annotations by name (and likely prefers the JSR-305 annotations, maybe due to the deprecation in particular).

    For an example, here is the source of @ParametersAreNonnullByDefault.

    For more information, you might need to email the author of JSR-305 and FindBugs: Bill Pugh (here is his website). Also, the issue has been added to the Sourceforge bug tracker (here).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was looking for a list of annotations in Java that have some meaningful
Super-newbie question! I've been looking for a list of all the classes that come
I've been looking for list of types of queries that geocoder supports beyond regular
Im looking to group and sort a Generic List<>. I have a list of
I have been looking for a way to make form validation as easy and
I'm looking at List and I see a BinarySearch method with a few overloads,
let's say i have list looking like this: <select name=name id=id> <option value=10176232332>David</option> <option
Let's say I have a list looking like this: List=[alpha(1,2),beta(3,4),gamma(4,1)] Ok, so I want
I have a bean that i want to inject with a named list using
Just looking for a list of some popular WPF/Silverlight/C# sites out there for problems/troubleshooting

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.