jsr305

How to indicate that member fields are @Nonnull by default?

感情迁移 提交于 2019-12-03 05:42:48
My question is a follow-up to this one . In past versions of FindBugs, it was possible to use @DefaultAnnotation(Nonnull.class) or @DefaultAnnotationForFields(Nonnull.class) to indicate that all fields in a package should be treated as @Nonnull . In the current version of FindBugs (2.0), @DefaultAnnotation and @DefaultAnnotationForFields are deprecated, and we should all use JSR-305 instead. But JSR-305 doesn't seem to cover everything the (now deprecated) FindBugs annotations cover. The javadoc does suggest a number of alternatives: @ParametersAreNonnullByDefault . This (obviously) only

@Nullable/@NotNull with IntelliJ IDEA, Maven & JSR 305

自作多情 提交于 2019-11-30 04:57:41
I really like the code inspection functionalities which are now able with either JSR 305 or Jetbrains' proprietary annotations for IntelliJ. Unfortunately both implementations (JSR 305 and Jetbrains') do not mix well: IntelliJ obviously only understands its own proprietary set of annotations and integrates them quite well. Using Findbugs in my Maven Build, it only supports JSR-305 annotations. The only possible workaround might be to go for JSR-305 and use the Findbugs plugin in IntelliJ. Has anybody a better idea? (please don't say change your IDE ;) ). Thanks Thomas This has been made

@Nullable/@NotNull with IntelliJ IDEA, Maven & JSR 305

空扰寡人 提交于 2019-11-29 02:35:10
问题 I really like the code inspection functionalities which are now able with either JSR 305 or Jetbrains' proprietary annotations for IntelliJ. Unfortunately both implementations (JSR 305 and Jetbrains') do not mix well: IntelliJ obviously only understands its own proprietary set of annotations and integrates them quite well. Using Findbugs in my Maven Build, it only supports JSR-305 annotations. The only possible workaround might be to go for JSR-305 and use the Findbugs plugin in IntelliJ. Has

JSR-305 annotations replacement for Java 9

雨燕双飞 提交于 2019-11-29 01:51:49
问题 So far we have been using the Findbugs JSR-305 annotations (com.google.code.findbugs:jsr305) and everything including tool support (Sonar, Eclipse, Findbugs, …) has been working fine. However it is our understanding that Jigsaw in Java 9 is going to break JSR-305 annotations (one package in two modules is not allowed). This was confirmed at JavaOne 2015. Oracle's reasoning is JSR-305 never happened and JSR-250 would have to endorse these annotations. We're looking for replacements for JSR-305

What is the status of JSR 305?

江枫思渺然 提交于 2019-11-28 16:46:36
I have seen the question JSR305 vs. JSR308 (Java Type Anotations) - Which is going to be the standard? and I understand the difference between JSR 308 and JSR 305 . I also understand that, at this time, 308 is slated for Java 7, and 305 is not, and I am curious about the overall status of 305. Specifically, I am using Google Collections and JSR-305 in some of my projects (in a similar manner to what one of the Guice best practices advocates ) and was wondering if there is a more "future direction"-friendly approach I should be using instead. I am planning to also ask about this on the JSR-305