Adding errorprone support and fix chained dataloader bug#4002
Adding errorprone support and fix chained dataloader bug#4002
Conversation
Test Results 318 files 318 suites 2m 50s ⏱️ Results for commit a05a319. ♻️ This comment has been updated with latest results. |
8d3e1bd to
1d5d4f6
Compare
| } | ||
| test.dependsOn testWithJava17 | ||
| test.dependsOn testWithJava11 | ||
|
|
There was a problem hiding this comment.
Nice - I am guessing this runs on both JDKs
There was a problem hiding this comment.
we specify inside the task different toolchains ...so we run the tests with different Java versions
| .build() | ||
|
|
||
| then: "execution shouldn't error" | ||
| for (int i = 0; i < NUM_OF_REPS; i++) { |
There was a problem hiding this comment.
why did this change ????
There was a problem hiding this comment.
Because I found that the @RepeatUntilFailure is better way to achieve the same goal.
| for (ResultPathWithDataLoader resultPathWithDataLoader : callStack.allResultPathWithDataLoader) { | ||
| // we need to copy the list because the callStack.allResultPathWithDataLoader can be modified concurrently | ||
| // while iterating over it | ||
| ArrayList<ResultPathWithDataLoader> resultPathWithDataLoaders = new ArrayList<>(callStack.allResultPathWithDataLoader); |
There was a problem hiding this comment.
@bbakerman fyi: this is a fix for a bug I found by running the tests on Java 21. This problem didn't show up earlier.
|
|
||
| def 'Executable Definitions with type definition'() { | ||
| def query = """ | ||
| def query = StringGroovyMethods.stripIndent(""" |
There was a problem hiding this comment.
Java 15 introduced a stripIndent method which is used by default now. In order to keep the tests the same we now specify the groovy method explicitly
| - uses: actions/checkout@v4 | ||
| - uses: gradle/actions/wrapper-validation@v4 | ||
| - name: Set up JDK 11 | ||
| - name: Set up JDK 21 |
There was a problem hiding this comment.
We should run gradle on the latest version by default.
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
@Contractis 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/