Skip to content

Commit 0d49dba

Browse files
committed
Exclude deprecated APIs from nullability checks
Issue #4673
1 parent 1b675b4 commit 0d49dba

File tree

52 files changed

+140
-8
lines changed

Some content is hidden

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

52 files changed

+140
-8
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
package org.springframework.batch.core.configuration;
1717

18+
import org.jspecify.annotations.NullUnmarked;
19+
1820
import org.springframework.batch.core.job.Job;
1921

2022
/**
@@ -23,6 +25,7 @@
2325
* @author Dave Syer
2426
* @author Mahmoud Ben Hassine
2527
*/
28+
@NullUnmarked
2629
@Deprecated(since = "6.0", forRemoval = true)
2730
public interface JobFactory {
2831

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
package org.springframework.batch.core.configuration;
1717

18+
import org.jspecify.annotations.NullUnmarked;
19+
1820
import org.springframework.batch.core.job.Job;
1921
import org.springframework.batch.core.launch.NoSuchJobException;
2022
import org.springframework.lang.Nullable;
@@ -28,6 +30,7 @@
2830
* @deprecated since 6.0 in favor of {@link JobRegistry}. Scheduled for removal in 6.2 or
2931
* later.
3032
*/
33+
@NullUnmarked
3134
@Deprecated(since = "6.0", forRemoval = true)
3235
public interface JobLocator {
3336

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
import java.util.Collection;
1919

20+
import org.jspecify.annotations.NullUnmarked;
21+
2022
/**
2123
* A listable extension of {@link JobLocator}.
2224
*
@@ -25,6 +27,7 @@
2527
* @deprecated since 6.0, scheduled for removal in 6.2 or later. Use {@link JobRegistry}
2628
* instead.
2729
*/
30+
@NullUnmarked
2831
@Deprecated(since = "6.0", forRemoval = true)
2932
public interface ListableJobLocator extends JobLocator {
3033

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
package org.springframework.batch.core.configuration.annotation;
1717

18+
import org.jspecify.annotations.NullUnmarked;
19+
1820
import org.springframework.batch.core.configuration.JobRegistry;
1921
import org.springframework.batch.core.configuration.support.ApplicationContextFactory;
2022
import org.springframework.batch.core.configuration.support.AutomaticJobRegistrar;
@@ -32,6 +34,7 @@
3234
* @since 5.0
3335
* @deprecated since 6.0 with no replacement. Scheduled for removal in 6.2 or later.
3436
*/
37+
@NullUnmarked
3538
@Deprecated(since = "6.0", forRemoval = true)
3639
class AutomaticJobRegistrarBeanPostProcessor implements BeanFactoryPostProcessor, BeanPostProcessor {
3740

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/AbstractApplicationContextFactory.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import org.apache.commons.logging.Log;
2525
import org.apache.commons.logging.LogFactory;
26+
import org.jspecify.annotations.NullUnmarked;
2627

2728
import org.springframework.beans.BeansException;
2829
import org.springframework.beans.factory.BeanFactoryAware;
@@ -50,6 +51,7 @@
5051
*
5152
* @deprecated since 6.0 with no replacement. Scheduled for removal in 6.2 or later.
5253
*/
54+
@NullUnmarked
5355
@Deprecated(since = "6.0", forRemoval = true)
5456
public abstract class AbstractApplicationContextFactory implements ApplicationContextFactory, ApplicationContextAware {
5557

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/ApplicationContextFactory.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package org.springframework.batch.core.configuration.support;
1818

19+
import org.jspecify.annotations.NullUnmarked;
20+
1921
import org.springframework.batch.core.job.Job;
2022
import org.springframework.context.ApplicationContext;
2123
import org.springframework.context.ConfigurableApplicationContext;
@@ -28,6 +30,7 @@
2830
* @author Mahmoud Ben Hassine
2931
* @deprecated since 6.0 with no replacement. Scheduled for removal in 6.2 or later.
3032
*/
33+
@NullUnmarked
3134
@Deprecated(since = "6.0", forRemoval = true)
3235
public interface ApplicationContextFactory {
3336

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/ApplicationContextJobFactory.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
package org.springframework.batch.core.configuration.support;
1717

18+
import org.jspecify.annotations.NullUnmarked;
19+
1820
import org.springframework.batch.core.job.Job;
1921
import org.springframework.batch.core.configuration.JobFactory;
2022
import org.springframework.context.ApplicationContext;
@@ -29,6 +31,7 @@
2931
* @deprecated since 6.0 with no replacement. Scheduled for removal in 6.2 or later.
3032
*
3133
*/
34+
@NullUnmarked
3235
@Deprecated(since = "6.0", forRemoval = true)
3336
public class ApplicationContextJobFactory implements JobFactory {
3437

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/AutomaticJobRegistrar.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
import java.util.Arrays;
2121
import java.util.Collection;
2222

23+
import org.jspecify.annotations.NullUnmarked;
24+
2325
import org.springframework.batch.core.job.Job;
2426
import org.springframework.batch.core.configuration.DuplicateJobException;
2527
import org.springframework.batch.core.configuration.JobRegistry;
@@ -44,6 +46,7 @@
4446
* @since 2.1
4547
* @deprecated since 6.0 with no replacement. Scheduled for removal in 6.2 or later.
4648
*/
49+
@NullUnmarked
4750
@Deprecated(since = "6.0", forRemoval = true)
4851
public class AutomaticJobRegistrar implements Ordered, SmartLifecycle, ApplicationContextAware, InitializingBean {
4952

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/ClasspathXmlApplicationContextsFactoryBean.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
import java.util.Arrays;
2020
import java.util.List;
2121

22+
import org.jspecify.annotations.NullUnmarked;
23+
2224
import org.springframework.beans.factory.BeanFactoryAware;
2325
import org.springframework.beans.factory.FactoryBean;
2426
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
@@ -37,6 +39,7 @@
3739
* @author Mahmoud Ben Hassine
3840
* @deprecated since 6.0 with no replacement. Scheduled for removal in 6.2 or later.
3941
*/
42+
@NullUnmarked
4043
@SuppressWarnings("removal")
4144
@Deprecated(since = "6.0", forRemoval = true)
4245
public class ClasspathXmlApplicationContextsFactoryBean

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/DefaultJobLoader.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import org.apache.commons.logging.Log;
2525
import org.apache.commons.logging.LogFactory;
26+
import org.jspecify.annotations.NullUnmarked;
2627

2728
import org.springframework.batch.core.job.Job;
2829
import org.springframework.batch.core.step.Step;
@@ -48,6 +49,7 @@
4849
* @author Mahmoud Ben Hassine
4950
* @deprecated since 6.0 with no replacement. Scheduled for removal in 6.2 or later.
5051
*/
52+
@NullUnmarked
5153
@Deprecated(since = "6.0", forRemoval = true)
5254
public class DefaultJobLoader implements JobLoader, InitializingBean {
5355

0 commit comments

Comments
 (0)