Adding errorprone support and fix chained dataloader bug by bbakerman · Pull Request #4002 · graphql-java/graphql-java

Nullaway

This PR adds errorprone / nullaway / jspecify support.

It changes the tests to run on 11/17/21 (and not just in 11 as before).
We compile and build with Java 21 now, but release for 11.
Gradle itself also runs now with 21 in the github actions.

A new custom annotation @Contract is introduced to enable custom contracts for example for the Assert class.
We fix up a few places that were found by nullaway.

One specific PropertyDataFetcher test is failing for 17/21, so it is now ignored when executed on a JVM > 11. As this is not a new problem we decided to ignore it in this case and deal with it later.

DataLoader bugfix

It also fixes a bug for the new chained dataloader logic that showed up only when running the tests with Java 21/