Skip to content

Commit 0343720

Browse files
authored
Polish samples (#5187)
1. remove methods indentical to default method 2. remove unused method parameter 3. fix visibility scope Signed-off-by: Yanming Zhou <[email protected]>
1 parent 1d9536c commit 0343720

File tree

5 files changed

+3
-19
lines changed

5 files changed

+3
-19
lines changed

spring-batch-samples/src/main/java/org/springframework/batch/samples/common/ErrorLogTasklet.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,4 @@ public void beforeStep(StepExecution stepExecution) {
8181
stepExecution.getJobExecution().getExecutionContext().remove("stepName");
8282
}
8383

84-
@Override
85-
public @Nullable ExitStatus afterStep(StepExecution stepExecution) {
86-
return null;
87-
}
88-
8984
}

spring-batch-samples/src/main/java/org/springframework/batch/samples/common/StagingItemReader.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,6 @@ private static Object deserialize(InputStream inputStream) {
132132
}
133133
}
134134

135-
@Override
136-
public @Nullable ExitStatus afterStep(StepExecution stepExecution) {
137-
return null;
138-
}
139-
140135
@Override
141136
public void beforeStep(StepExecution stepExecution) {
142137
this.stepExecution = stepExecution;

spring-batch-samples/src/main/java/org/springframework/batch/samples/common/StagingItemWriter.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,6 @@ public void setValues(PreparedStatement ps, int i) throws SQLException {
9696
});
9797
}
9898

99-
@Override
100-
public @Nullable ExitStatus afterStep(StepExecution stepExecution) {
101-
return null;
102-
}
103-
10499
@Override
105100
public void beforeStep(StepExecution stepExecution) {
106101
this.stepExecution = stepExecution;

spring-batch-samples/src/main/java/org/springframework/batch/samples/partitioning/local/PartitionJdbcJobConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
@Import(DataSourceConfiguration.class)
4343
public class PartitionJdbcJobConfiguration {
4444

45-
record Owner(int id, String firstName, String lastName) {
45+
public record Owner(int id, String firstName, String lastName) {
4646
}
4747

4848
@Bean

spring-batch-samples/src/main/java/org/springframework/batch/samples/remotestep/ManagerConfiguration.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,10 @@ public DirectChannel requests() {
5858
}
5959

6060
@Bean
61-
public IntegrationFlow outboundFlow(ActiveMQConnectionFactory connectionFactory, BeanFactory beanFactory) {
62-
StandardIntegrationFlow integrationFlow = IntegrationFlow.from(requests())
61+
public IntegrationFlow outboundFlow(ActiveMQConnectionFactory connectionFactory) {
62+
return IntegrationFlow.from(requests())
6363
.handle(Jms.outboundAdapter(connectionFactory).destination("requests"))
6464
.get();
65-
return integrationFlow;
6665
}
6766

6867
@Bean

0 commit comments

Comments
 (0)