Skip to content

Commit b812492

Browse files
committed
Remove deprecated APIs scheduled for removal in v5.2
Resolves #4398
1 parent 94ec542 commit b812492

File tree

54 files changed

+183
-4412
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+183
-4412
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/JobParameters.java

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2023 the original author or authors.
2+
* Copyright 2006-2024 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.
@@ -378,24 +378,4 @@ public String toString() {
378378
return new StringBuilder("{").append(String.join(",", parameters)).append("}").toString();
379379
}
380380

381-
/**
382-
* @return The {@link Properties} that contain the key and values for the
383-
* {@link JobParameter} objects.
384-
* @deprecated since 5.0, scheduled for removal in 5.2. Use
385-
* {@link org.springframework.batch.core.converter.JobParametersConverter#getProperties(JobParameters)}
386-
*
387-
*/
388-
@Deprecated(since = "5.0", forRemoval = true)
389-
public Properties toProperties() {
390-
Properties props = new Properties();
391-
392-
for (Map.Entry<String, JobParameter<?>> param : parameters.entrySet()) {
393-
if (param.getValue() != null) {
394-
props.put(param.getKey(), Objects.toString(param.getValue().toString(), ""));
395-
}
396-
}
397-
398-
return props;
399-
}
400-
401381
}

spring-batch-core/src/main/java/org/springframework/batch/core/JobParametersBuilder.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2023 the original author or authors.
2+
* Copyright 2006-2024 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.
@@ -256,20 +256,6 @@ public JobParameters toJobParameters() {
256256
return new JobParameters(this.parameterMap);
257257
}
258258

259-
/**
260-
* Add a new {@link JobParameter} for the given key.
261-
* @param key The parameter accessor.
262-
* @param jobParameter The runtime parameter.
263-
* @return a reference to this object.
264-
* @deprecated since 5.0, scheduled for removal in 5.2. Use {@link #addJobParameter}.
265-
*/
266-
@Deprecated(since = "5.0", forRemoval = true)
267-
public JobParametersBuilder addParameter(String key, JobParameter<?> jobParameter) {
268-
Assert.notNull(jobParameter, "JobParameter must not be null");
269-
this.parameterMap.put(key, jobParameter);
270-
return this;
271-
}
272-
273259
/**
274260
* Add a new {@link JobParameter} for the given key.
275261
* @param key The parameter accessor.

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/JobBuilderFactory.java

Lines changed: 0 additions & 58 deletions
This file was deleted.

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/StepBuilderFactory.java

Lines changed: 0 additions & 59 deletions
This file was deleted.

spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobOperator.java

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2023 the original author or authors.
2+
* Copyright 2006-2024 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.
@@ -101,24 +101,6 @@ default JobInstance getJobInstance(String jobName, JobParameters jobParameters)
101101
*/
102102
String getParameters(long executionId) throws NoSuchJobExecutionException;
103103

104-
/**
105-
* Start a new instance of a job with the parameters specified.
106-
* @param jobName the name of the {@link Job} to launch
107-
* @param parameters the parameters to launch it with (new line separated key=value
108-
* pairs)
109-
* @return the id of the {@link JobExecution} that is launched
110-
* @throws NoSuchJobException if there is no {@link Job} with the specified name
111-
* @throws JobInstanceAlreadyExistsException if a job instance with this name and
112-
* parameters already exists
113-
* @throws JobParametersInvalidException thrown if any of the job parameters are
114-
* invalid.
115-
* @deprecated use {@link #start(String, Properties)} instead. Will be removed in
116-
* v5.2.
117-
*/
118-
@Deprecated(since = "5.0.1", forRemoval = true)
119-
Long start(String jobName, String parameters)
120-
throws NoSuchJobException, JobInstanceAlreadyExistsException, JobParametersInvalidException;
121-
122104
/**
123105
* Start a new instance of a job with the parameters specified.
124106
* @param jobName the name of the {@link Job} to launch

0 commit comments

Comments
 (0)