diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/BatchStatus.java b/spring-batch-core/src/main/java/org/springframework/batch/core/BatchStatus.java index 7efe0e573..02f017984 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/BatchStatus.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/BatchStatus.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2022 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,16 +26,16 @@ package org.springframework.batch.core; */ public enum BatchStatus { - /** + /* * The order of the status values is significant because it can be used to aggregate a - * set of status values. The result should be the maximum value. Since - * {@code COMPLETED} is first in the order, only if all elements of an execution are - * {@code COMPLETED} can the aggregate status be COMPLETED. A running execution is - * expected to move from {@code STARTING} to {@code STARTED} to {@code COMPLETED} - * (through the order defined by {@link #upgradeTo(BatchStatus)}). Higher values than - * {@code STARTED} signify more serious failures. {@code ABANDONED} is used for steps - * that have finished processing but were not successful and where they should be - * skipped on a restart (so {@code FAILED} is the wrong status). + * set of status values. The result should be the maximum value. Since {@code + * COMPLETED} is first in the order, only if all elements of an execution are {@code + * COMPLETED} can the aggregate status be COMPLETED. A running execution is expected + * to move from {@code STARTING} to {@code STARTED} to {@code COMPLETED} (through the + * order defined by {@link #upgradeTo(BatchStatus)}). Higher values than {@code + * STARTED} signify more serious failures. {@code ABANDONED} is used for steps that + * have finished processing but were not successful and where they should be skipped + * on a restart (so {@code FAILED} is the wrong status). */ /** diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java index 5feedab76..cd7808b9e 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java @@ -33,6 +33,7 @@ import org.springframework.batch.core.launch.support.TaskExecutorJobLauncher; import org.springframework.batch.core.repository.JobRepository; import org.springframework.batch.core.repository.dao.AbstractJdbcBatchMetadataDao; import org.springframework.context.annotation.Import; +import org.springframework.transaction.PlatformTransactionManager; /** *

@@ -49,7 +50,7 @@ import org.springframework.context.annotation.Import; * * @Bean * public Job job(JobRepository jobRepository) { - * return new JobBuilder("myJob").repository(jobRepository).start(step1()).next(step2()).build(); + * return new JobBuilder("myJob", jobRepository).start(step1()).next(step2()).build(); * } * * @Bean @@ -64,10 +65,9 @@ import org.springframework.context.annotation.Import; * } * * - * This annotation configures JDBC-based Batch infrastrcuture beans, so you must provide a - * {@link DataSource} and a - * {@link org.springframework.transaction.PlatformTransactionManager} as a beans in the - * application context. + * This annotation configures JDBC-based Batch infrastructure beans, so you must provide a + * {@link DataSource} and a {@link PlatformTransactionManager} as beans in the application + * context. * * Note that only one of your configuration classes needs to have the * @EnableBatchProcessing annotation. Once you have an diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/converter/JobParametersConversionException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/converter/JobParametersConversionException.java index 0f8d790b1..043ffa656 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/converter/JobParametersConversionException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/converter/JobParametersConversionException.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 the original author or authors. + * Copyright 2022-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +package org.springframework.batch.core.converter; /** * Exception to report an error when converting job parameters. @@ -20,8 +21,6 @@ * @author Mahmoud Ben Hassine * @since 5.0 */ -package org.springframework.batch.core.converter; - public class JobParametersConversionException extends RuntimeException { /** diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/test/repository/SybaseJobRepositoryIntegrationTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/test/repository/SybaseJobRepositoryIntegrationTests.java index 954dc47e1..7f58dcb80 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/test/repository/SybaseJobRepositoryIntegrationTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/test/repository/SybaseJobRepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2022 the original author or authors. + * Copyright 2020-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,8 +49,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; * The Sybase official jdbc driver is not freely available. This test uses the * non-official jTDS driver. There is no official public Docker image for Sybase neither. * This test uses the non-official Docker image by Jetbrains. Sybase in not supported in - * testcontainers. Sybase support is tested manually for the moment: 1. Run `docker run - * -d -t -p 5000:5000 -eSYBASE_USER=sa -eSYBASE_PASSWORD=sa -eSYBASE_DB=test + * testcontainers. Sybase support is tested manually for the moment: 1. Run `docker run -d + * -t -p 5000:5000 -eSYBASE_USER=sa -eSYBASE_PASSWORD=sa -eSYBASE_DB=test * datagrip/sybase:16.0` 2. Update the datasource configuration with the IP of the * container 3. Run the test `testJobExecution` * diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/TaskExecutorRepeatTemplate.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/TaskExecutorRepeatTemplate.java index 5efd05320..44dba5b44 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/TaskExecutorRepeatTemplate.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/TaskExecutorRepeatTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2022 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -112,7 +112,7 @@ public class TaskExecutorRepeatTemplate extends RepeatTemplate { */ runnable = new ExecutingRunnable(callback, context, queue); - /** + /* * Tell the runnable that it can expect a result. This could have been * in-lined with the constructor, but it might block, so it's better to do it * here, since we have the option (it's a private class). diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/file/FlatFileItemWriterTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/file/FlatFileItemWriterTests.java index c0c74d86b..53eeaaaf8 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/file/FlatFileItemWriterTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/file/FlatFileItemWriterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2022 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -808,7 +808,7 @@ class FlatFileItemWriterTests { } @Test - /** + /* * If append=true a new output file should still be created on the first run (not * restart). */ diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/AsyncItemProcessorMessagingGatewayTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/AsyncItemProcessorMessagingGatewayTests.java index 6e93b1bf6..4aa7c1747 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/AsyncItemProcessorMessagingGatewayTests.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/AsyncItemProcessorMessagingGatewayTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2022 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,7 +60,7 @@ class AsyncItemProcessorMessagingGatewayTests { } for (Future future : list) { String value = future.get(); - /** + /* * This delegate is a Spring Integration MessagingGateway. It can easily * return null because of a timeout, but that will be treated by Batch as a * filtered item, whereas it is really more like a skip. So we have to throw diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/PollingAsyncItemProcessorMessagingGatewayTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/PollingAsyncItemProcessorMessagingGatewayTests.java index 472376985..5225376cd 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/PollingAsyncItemProcessorMessagingGatewayTests.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/PollingAsyncItemProcessorMessagingGatewayTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2022 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -62,7 +62,7 @@ class PollingAsyncItemProcessorMessagingGatewayTests { } for (Future future : list) { String value = future.get(); - /** + /* * This delegate is a Spring Integration MessagingGateway. It can easily * return null because of a timeout, but that will be treated by Batch as a * filtered item, whereas it is really more like a skip. So we have to throw