JetBrains / java-annotations

Annotations for JVM-based languages.
Apache License 2.0
404 stars 47 forks source link

[#8] Publish Range annotation #9

Closed amaembo closed 5 years ago

amaembo commented 5 years ago

@chashnikov please review!

A version bump will be committed separately if this PR is accepted.

Currently IDEA already recognizes this annotation in fields and method return values. We use it as external for a year or so. I think it's perfectly ok to publish it, so users could annotate their own methods, gaining the benefits from better static analysis after that. We can separately discuss whether default values should be added to from and/or to. AFAIK adding default values later is both source and binary compatible change.