Comments (8)
I am fine with it. The idea is just to make
@CheckForNull
another supported nullable annotation, right? As an exact alias for@Nullable
, correct?
Yes, just an alias for @Nullable
. (The reason is that SpotBugs treats @Nullable
differently: such references might be null but should not be flagged by a tool. In Spotbugs the semantics of @CheckForNull
is the same as your @Nullable
annotation). Then teams can use SpotBugs and NullAway to check the code...
from nullaway.
Which library provides the @CheckForNull
annotation?
from nullaway.
javax.annotation
(jsr305 / findbugs)
from nullaway.
Cool, this should be easy to support
from nullaway.
Just for your information, Guava is migrating off from jsr305.
from nullaway.
Are you ok with a pull request that adds support for a @CheckForNull
annotation? From the code it looks like that I just need to update
Or is there something conceptional wrong with this issue? Supporting CheckForNull
would help projects a lot that use NullAway and SpotBugs
from nullaway.
I would be open to a PR that just adds @CheckForNull
support. @lazaroclapp please comment if you see an issue with that.
from nullaway.
I am fine with it. The idea is just to make CheckForNull
another supported nullable annotation, right? As an exact alias for @Nullable
, correct? Reading the previous discussion, we were a bit concerned about overhead of equality checking so many annotations if we just supported a custom list. But given that there seems to be interest for this particular annotation, I'd say go ahead.
We can open a separate task to optimize isNullableAnnotation
and profile later.
from nullaway.
Related Issues (20)
- Investigate warnings from JSpecify mode on caffeine HOT 3
- Add special handling for reading generic type argument annotations from bytecode, if needed
- Add an option to support correct positioning of type use annotations on arrays, even outside JSpecify mode HOT 5
- com.uber.nullaway.generics.CheckIdenticalNullabilityVisitor.visitClassType Did not find supertype of HOT 5
- Variable checked non-null outside a `forEach` or `Stream` lambda triggers an error HOT 13
- `if` statement on a boolean does not prevent a dereferenced nullable error HOT 1
- Null `if` check and failing function to taken in account HOT 2
- Extract methods in StreamNullabilityPropagator HOT 1
- ignoring generic Nullable on Supplier HOT 14
- Published NonNull Present HOT 6
- Tracking issue: making `jspecify/jdk` library models available to NullAway users
- Remove OptionalEmptinessHandler method for propagating access paths to lambdas
- Set up the JMH benchmarking workflow again, but in a safer manner
- MethodRef Javadocs wrong for method with multiple arguments (space after comma doesn't work) HOT 2
- Clarify interactions between settings for generated code, restrictive annotations, etc. HOT 3
- Maven NullAway setup not detecting anything in the project HOT 2
- In JSpecify mode, reason about array contents nullability in for-each loop over array
- An unhandled exception was thrown by the Error Prone static analysis plugin. HOT 2
- `@NullUnmarked` on a constructor does not suppress initializer errors
- isJSpecifyMode: JCTree$JCMethodInvocation cannot be cast to class VariableTree HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nullaway.