Skip to content

Commit e4ca454

Browse files
committed
Upgrade NullAway version to 0.12.11
This now requires a JDK 22+ [1] so this commit also updates the CI and build instructions accordingly. [1]: https://github.com/uber/NullAway/wiki/JSpecify-Support#supported-jdk-versions
1 parent 3080a6e commit e4ca454

File tree

8 files changed

+21
-60
lines changed

8 files changed

+21
-60
lines changed

.github/workflows/artifactory-staging.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
- name: Checkout source code
1616
uses: actions/checkout@v4.2.2
1717

18-
- name: Set up JDK 17
19-
uses: actions/setup-java@v4.7.1
18+
- name: Set up JDK 25
19+
uses: actions/setup-java@v5
2020
with:
21-
java-version: '17'
21+
java-version: '25'
2222
distribution: 'temurin'
2323
cache: 'maven'
2424

.github/workflows/continuous-integration.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
- name: Checkout source code
1111
uses: actions/checkout@v4.2.2
1212

13-
- name: Set up JDK 17
14-
uses: actions/setup-java@v4.7.1
13+
- name: Set up JDK 25
14+
uses: actions/setup-java@v5
1515
with:
16-
java-version: '17'
16+
java-version: '25'
1717
distribution: 'temurin'
1818
cache: 'maven'
1919

.github/workflows/documentation-upload.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
- name: Checkout source code
1919
uses: actions/checkout@v3
2020

21-
- name: Set up JDK 17
22-
uses: actions/setup-java@v3
21+
- name: Set up JDK 25
22+
uses: actions/setup-java@v5
2323
with:
24-
java-version: '17'
24+
java-version: '25'
2525
distribution: 'temurin'
2626
cache: 'maven'
2727

.github/workflows/release-notes-generation.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ jobs:
2323
- name: Download changelog generator
2424
run: wget https://github.com/spring-io/github-changelog-generator/releases/download/v$GENERATOR_VERSION/github-changelog-generator.jar
2525

26-
- name: Set up JDK 17
27-
uses: actions/setup-java@v3
26+
- name: Set up JDK 25
27+
uses: actions/setup-java@v5
2828
with:
29-
java-version: '17'
29+
java-version: '25'
3030
distribution: 'temurin'
31+
cache: 'maven'
3132

3233
- name: Prepare configuration file
3334
run: |

README.md

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,13 @@ Please see our [Security policy](https://github.com/spring-projects/spring-batch
163163

164164
# Building from Source
165165

166-
## Using the Command Line
167-
168166
Clone the git repository using the URL on the Github home page:
169167

170168
$ git clone git@github.com:spring-projects/spring-batch.git
171169
$ cd spring-batch
172170

173-
Maven is the build tool used for Spring Batch. You can build the project with the following command:
171+
To build Spring Batch, you need a JDK 22+. Maven is the build tool used for Spring Batch.
172+
You can build the project with the following command:
174173

175174
$ ./mvnw package
176175

@@ -189,27 +188,6 @@ $ ../mvnw antora:antora
189188

190189
The reference documentation can be found in `spring-batch-docs/target/anotra/site`.
191190

192-
## Using Docker
193-
194-
If you want to build the project in a Docker container, you can proceed as follows:
195-
196-
```
197-
$> docker run -it --mount type=bind,source="$(pwd)",target=/spring-batch maven:3-openjdk-17 bash
198-
#> cd spring-batch
199-
#> ./mvnw package
200-
```
201-
202-
This will mount the source code that you cloned previously on the host inside the container.
203-
If you want to work on a copy of the source code inside the container (no side effects on the host),
204-
you can proceed as follows:
205-
206-
```
207-
$> docker run -it maven:3-openjdk-17 bash
208-
#> git clone https://github.com/spring-projects/spring-batch.git
209-
#> cd spring-batch
210-
#> ./mvnw package
211-
```
212-
213191
# Contributing to Spring Batch
214192

215193
We welcome contributions in any kind! Here are some ways for you to contribute to the project:

pom.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
<maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
147147
<spring-javaformat-maven-plugin.version>0.0.47</spring-javaformat-maven-plugin.version>
148148
<error-prone.version>2.42.0</error-prone.version>
149-
<nullaway.version>0.12.10</nullaway.version>
149+
<nullaway.version>0.12.11</nullaway.version>
150150
</properties>
151151

152152
<build>
@@ -182,8 +182,6 @@
182182
-Xep:NullAway:ERROR
183183
-XepOpt:NullAway:JSpecifyMode=true
184184
-XepOpt:NullAway:OnlyNullMarked
185-
<!-- FIXME Remove once https://github.com/uber/NullAway/pull/1295 is released -->
186-
-XepOpt:NullAway:CustomContractAnnotations=org.springframework.lang.Contract
187185
-XepOpt:NullAway:SuppressionNameAliases=DataFlowIssue
188186
<!-- https://github.com/uber/NullAway/issues/162 -->
189187
-XepExcludedPaths:.*/src/test/java/.*

spring-batch-infrastructure/src/main/java/org/springframework/batch/infrastructure/support/MethodInvoker.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-present the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,6 +26,6 @@
2626
*/
2727
public interface MethodInvoker {
2828

29-
@Nullable Object invokeMethod(Object... args);
29+
@Nullable Object invokeMethod(@Nullable Object... args);
3030

3131
}

spring-batch-infrastructure/src/main/java/org/springframework/batch/infrastructure/support/SimpleMethodInvoker.java

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* https://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
16-
17-
/*
18-
* Copyright 2002-2008 the original author or authors.
2+
* Copyright 2002-present the original author or authors.
193
*
204
* Licensed under the Apache License, Version 2.0 (the "License");
215
* you may not use this file except in compliance with the License.
@@ -83,10 +67,10 @@ private static Method getMethodIfAvailable(Class<?> clazz, String methodName, Cl
8367
}
8468

8569
@Override
86-
public @Nullable Object invokeMethod(Object... args) {
70+
public @Nullable Object invokeMethod(@Nullable Object... args) {
8771

8872
Class<?>[] parameterTypes = method.getParameterTypes();
89-
Object[] invokeArgs;
73+
@Nullable Object[] invokeArgs;
9074
if (parameterTypes.length == 0) {
9175
invokeArgs = new Object[] {};
9276
}

0 commit comments

Comments
 (0)