Check `instanceof Foo` instead of `instanceof Object`.

The latter is entirely equivalent to a null check. Thus, if the result
is `false`, tools may want to recognize that the value is `null`.

Perhaps there should be a sample that checks just that, but `instanceof
Object` is rare enough that recognizing it is more of a "nice to have"
than an essential. (We already try to avoid assuming most dataflow logic
in our samples, but we've made exceptions for common cases that we
expect ~every tool to want to recognize.)

Fixes https://github.com/jspecify/jspecify/issues/164
1 file changed
tree: 1ba9e28fc7e7af8571760a4452f14252c5ac3c73
  1. .github/
  2. cftojspecify/
  3. docs/
  4. gradle/
  5. samples/
  6. src/
  7. .gitattributes
  8. .gitignore
  9. AUTHORS
  10. build.gradle
  11. CONTRIBUTING.md
  12. gradle.properties
  13. gradlew
  14. gradlew.bat
  15. LICENSE
  16. README.md
  17. settings.gradle
README.md

JSpecify

This project is a placeholder. We are using the issue tracker for some of our conversations, but the existing code in the repo does not reflect our current design decisions, and we have many decisions left to make.

An artifact of well-named and well-specified annotations to power static analysis checks.

Our focus during 2018-2022 is annotations for nullness.

This is not an officially supported product of any of the participant organizations.

How to build

Simply run ./gradlew to build artifacts. Or run ./gradlew publishToMavenLocal to install artifacts to your Local Maven Repository.