From ac5825758cc37b81b5668da3f9e053eedbaea9f4 Mon Sep 17 00:00:00 2001 From: Mahmoud Ben Hassine Date: Thu, 21 Sep 2023 15:32:52 +0200 Subject: [PATCH] Add missing deprecation note This should have been part of 1ff04d53 Issue #2218 --- .../core/configuration/xml/StepParserStepFactoryBean.java | 3 +++ .../batch/core/step/factory/SimpleStepFactoryBean.java | 4 ++++ .../batch/core/configuration/xml/spring-batch.xsd | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java index 5d80eebfda..cbad5b1cee 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java @@ -997,7 +997,10 @@ public void setTaskExecutor(TaskExecutor taskExecutor) { * concurrent processing to prevent thread pools from being overwhelmed. Defaults to * {@link TaskExecutorRepeatTemplate#DEFAULT_THROTTLE_LIMIT}. * @param throttleLimit The throttle limit to set. + * @deprecated since 5.0, scheduled for removal in 6.0. This API is not intended for + * end users anyway. It is only used by the XML namespace parser. */ + @Deprecated(since = "5.0", forRemoval = true) public void setThrottleLimit(Integer throttleLimit) { this.throttleLimit = throttleLimit; } diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/SimpleStepFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/SimpleStepFactoryBean.java index c2afcf40ec..5acb2a4d93 100755 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/SimpleStepFactoryBean.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/SimpleStepFactoryBean.java @@ -446,7 +446,11 @@ protected TaskExecutor getTaskExecutor() { * concurrent processing to prevent thread pools from being overwhelmed. Defaults to * {@link TaskExecutorRepeatTemplate#DEFAULT_THROTTLE_LIMIT}. * @param throttleLimit the throttle limit to set. + * @deprecated since 5.0, scheduled for removal in 6.0. Use a pooled + * {@link TaskExecutor} implementation with a limited capacity of its task queue + * instead. */ + @Deprecated(since = "5.0", forRemoval = true) public void setThrottleLimit(int throttleLimit) { this.throttleLimit = throttleLimit; } diff --git a/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch.xsd b/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch.xsd index 5fa659d735..9879886658 100644 --- a/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch.xsd +++ b/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch.xsd @@ -684,7 +684,8 @@