#1138 DefaultAnnotation Javadoc should suggest alternatives

open
5
2012-11-26
2012-11-23
No

@DefaultAnnotation is deprecated but the Javadoc doesn't explain why and what alternatives should be used.

Discussion

  • Gili Tzabari

    Gili Tzabari - 2012-11-23

    Please do the same for all other deprecated annotations as well. There are many posts on the mailing list asking this exact question and no answers.

     
  • Gili Tzabari

    Gili Tzabari - 2012-11-23

    Looks like this was already discussed in bug 3483864.

    I don't think it's sufficient to update the JSR305 annotations. A lot of people will skip over it because the JSR305 project looks dead. Please document the Findbugs annotations because that's the first place people will look.

    Also, you might want to point them to http://stackoverflow.com/a/9256595/14731

     
  • William Pugh

    William Pugh - 2012-11-25
    • assigned_to: nobody --> wpugh
    • status: open --> pending
     
  • William Pugh

    William Pugh - 2012-11-25

    The JavaDoc gives some description of what to use instead (see below). What in particular is puzzling about the suggestion.

    For example, you can use {@link javax.annotations.ParametersAreNonnullByDefault} instead
    of @DefaultAnnotation(NonNull.class), and {@link javax.annotations.meta.TypeQualifierDefault}
    in general to define a type qualifier default. The JSR305 {@link javax.annotation.CheckReturnValue}
    annotation can be applied to a type or package, and it will act as a default for all methods
    in that class or package unless otherwise overridden..

     
  • Gili Tzabari

    Gili Tzabari - 2012-11-26
    • status: pending --> open
     
  • Gili Tzabari

    Gili Tzabari - 2012-11-26

    Ah. That's why!

    If you examine the Java files in com.google.code.findbugs:findbugs:2.0.1 you will notice they are missing the Javadoc.

    Artifact com.google.code.findbugs:annotations::2.0.1 is fine. Can you fix the former please?

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks