Skip to content

Commit 0d1d89c

Browse files
hpoettkerfmbenhassine
authored andcommitted
Use annotation @Override consistently
1 parent 52beef2 commit 0d1d89c

File tree

138 files changed

+262
-1689
lines changed

Some content is hidden

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

138 files changed

+262
-1689
lines changed

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

-5
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,6 @@ private int severity(ExitStatus status) {
187187
return 7;
188188
}
189189

190-
/*
191-
* (non-Javadoc)
192-
*
193-
* @see java.lang.Object#toString()
194-
*/
195190
@Override
196191
public String toString() {
197192
return String.format("exitCode=%s;exitDescription=%s", exitCode, exitDescription);

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

-5
Original file line numberDiff line numberDiff line change
@@ -373,11 +373,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo
373373
failureExceptions = new ArrayList<>();
374374
}
375375

376-
/*
377-
* (non-Javadoc)
378-
*
379-
* @see org.springframework.batch.core.domain.Entity#toString()
380-
*/
381376
@Override
382377
public String toString() {
383378
return super.toString() + String.format(

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

-5
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,6 @@ public StepExecution getStepExecution() {
194194
return stepExecution;
195195
}
196196

197-
/*
198-
* (non-Javadoc)
199-
*
200-
* @see java.lang.Object#toString()
201-
*/
202197
@Override
203198
public String toString() {
204199
return "[StepContribution: read=" + readCount + ", written=" + writeCount + ", filtered=" + filterCount

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

-11
Original file line numberDiff line numberDiff line change
@@ -484,12 +484,6 @@ public void addFailureException(Throwable throwable) {
484484
this.failureExceptions.add(throwable);
485485
}
486486

487-
/*
488-
* (non-Javadoc)
489-
*
490-
* @see org.springframework.batch.container.common.domain.Entity#equals(java.
491-
* lang.Object)
492-
*/
493487
@Override
494488
public boolean equals(Object obj) {
495489

@@ -513,11 +507,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo
513507
failureExceptions = new ArrayList<>();
514508
}
515509

516-
/*
517-
* (non-Javadoc)
518-
*
519-
* @see org.springframework.batch.container.common.domain.Entity#hashCode()
520-
*/
521510
@Override
522511
public int hashCode() {
523512
Object jobExecutionId = getJobExecutionId();

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

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2022 the original author or authors.
2+
* Copyright 2006-2023 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.
@@ -97,11 +97,6 @@ public JobParametersValidator getJobParametersValidator() {
9797
return delegate.getJobParametersValidator();
9898
}
9999

100-
/*
101-
* (non-Javadoc)
102-
*
103-
* @see java.lang.Object#equals(java.lang.Object)
104-
*/
105100
@Override
106101
public boolean equals(Object obj) {
107102
if (obj instanceof GroupAwareJob) {
@@ -110,11 +105,6 @@ public boolean equals(Object obj) {
110105
return false;
111106
}
112107

113-
/*
114-
* (non-Javadoc)
115-
*
116-
* @see java.lang.Object#hashCode()
117-
*/
118108
@Override
119109
public int hashCode() {
120110
return delegate.hashCode();

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

-6
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,6 @@ public void setJobRegistry(JobRegistry jobRegistry) {
7979
this.jobRegistry = jobRegistry;
8080
}
8181

82-
/*
83-
* (non-Javadoc)
84-
*
85-
* @see org.springframework.beans.factory.BeanFactoryAware#setBeanFactory(org
86-
* .springframework.beans.factory.BeanFactory)
87-
*/
8882
@Override
8983
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
9084
if (beanFactory instanceof DefaultListableBeanFactory) {

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

-5
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,6 @@ protected void setJobFactoryRef(String jobFactoryRef) {
141141
this.jobFactoryRef = jobFactoryRef;
142142
}
143143

144-
/*
145-
* (non-Javadoc)
146-
*
147-
* @see AbstractSingleBeanDefinitionParser#getBeanClass(Element)
148-
*/
149144
@Override
150145
protected Class<?> getBeanClass(Element element) {
151146
return SimpleFlowFactoryBean.class;

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

-5
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,6 @@ public void afterPropertiesSet() throws Exception {
102102
}
103103
}
104104

105-
/*
106-
* (non-Javadoc)
107-
*
108-
* @see org.springframework.beans.factory.FactoryBean#getObject()
109-
*/
110105
@Override
111106
public SimpleFlow getObject() throws Exception {
112107
SimpleFlow flow = flowType.getConstructor(String.class).newInstance(name);

spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/SimpleJobExplorer.java

+1-66
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,6 @@ public SimpleJobExplorer(JobInstanceDao jobInstanceDao, JobExecutionDao jobExecu
8080
this.ecDao = ecDao;
8181
}
8282

83-
/*
84-
* (non-Javadoc)
85-
*
86-
* @see org.springframework.batch.core.explore.JobExplorer#findJobExecutions(
87-
* org.springframework.batch.core.JobInstance)
88-
*/
8983
@Override
9084
public List<JobExecution> getJobExecutions(JobInstance jobInstance) {
9185
List<JobExecution> executions = jobExecutionDao.findJobExecutions(jobInstance);
@@ -98,13 +92,8 @@ public List<JobExecution> getJobExecutions(JobInstance jobInstance) {
9892
return executions;
9993
}
10094

101-
/*
102-
* (non-Javadoc)
103-
*
104-
* @see org.springframework.batch.core.explore.JobExplorer#getLastJobExecution(
105-
* org.springframework.batch.core.JobInstance)
106-
*/
10795
@Nullable
96+
@Override
10897
public JobExecution getLastJobExecution(JobInstance jobInstance) {
10998
JobExecution lastJobExecution = jobExecutionDao.getLastJobExecution(jobInstance);
11099
if (lastJobExecution != null) {
@@ -116,12 +105,6 @@ public JobExecution getLastJobExecution(JobInstance jobInstance) {
116105
return lastJobExecution;
117106
}
118107

119-
/*
120-
* (non-Javadoc)
121-
*
122-
* @see org.springframework.batch.core.explore.JobExplorer#findRunningJobExecutions
123-
* (java.lang.String)
124-
*/
125108
@Override
126109
public Set<JobExecution> findRunningJobExecutions(@Nullable String jobName) {
127110
Set<JobExecution> executions = jobExecutionDao.findRunningJobExecutions(jobName);
@@ -134,12 +117,6 @@ public Set<JobExecution> findRunningJobExecutions(@Nullable String jobName) {
134117
return executions;
135118
}
136119

137-
/*
138-
* (non-Javadoc)
139-
*
140-
* @see org.springframework.batch.core.explore.JobExplorer#getJobExecution(java
141-
* .lang.Long)
142-
*/
143120
@Nullable
144121
@Override
145122
public JobExecution getJobExecution(@Nullable Long executionId) {
@@ -157,12 +134,6 @@ public JobExecution getJobExecution(@Nullable Long executionId) {
157134
return jobExecution;
158135
}
159136

160-
/*
161-
* (non-Javadoc)
162-
*
163-
* @see org.springframework.batch.core.explore.JobExplorer#getStepExecution(java
164-
* .lang.Long)
165-
*/
166137
@Nullable
167138
@Override
168139
public StepExecution getStepExecution(@Nullable Long jobExecutionId, @Nullable Long executionId) {
@@ -176,70 +147,34 @@ public StepExecution getStepExecution(@Nullable Long jobExecutionId, @Nullable L
176147
return stepExecution;
177148
}
178149

179-
/*
180-
* (non-Javadoc)
181-
*
182-
* @see org.springframework.batch.core.explore.JobExplorer#getJobInstance(java
183-
* .lang.Long)
184-
*/
185150
@Nullable
186151
@Override
187152
public JobInstance getJobInstance(@Nullable Long instanceId) {
188153
return jobInstanceDao.getJobInstance(instanceId);
189154
}
190155

191-
/*
192-
* (non-Javadoc)
193-
*
194-
* @see org.springframework.batch.core.explore.JobExplorer#getJobInstance(java
195-
* .lang.String, org.springframework.batch.core.JobParameters)
196-
*/
197156
@Nullable
198157
@Override
199158
public JobInstance getJobInstance(String jobName, JobParameters jobParameters) {
200159
return jobInstanceDao.getJobInstance(jobName, jobParameters);
201160
}
202161

203-
/*
204-
* (non-Javadoc)
205-
*
206-
* @see org.springframework.batch.core.explore.JobExplorer#getLastJobInstance(java
207-
* .lang.String)
208-
*/
209162
@Nullable
210163
@Override
211164
public JobInstance getLastJobInstance(String jobName) {
212165
return jobInstanceDao.getLastJobInstance(jobName);
213166
}
214167

215-
/*
216-
* (non-Javadoc)
217-
*
218-
* @see org.springframework.batch.core.explore.JobExplorer#getLastJobInstances
219-
* (java.lang.String, int)
220-
*/
221168
@Override
222169
public List<JobInstance> getJobInstances(String jobName, int start, int count) {
223170
return jobInstanceDao.getJobInstances(jobName, start, count);
224171
}
225172

226-
/*
227-
* (non-Javadoc)
228-
*
229-
* @see org.springframework.batch.core.explore.JobExplorer#getJobNames()
230-
*/
231173
@Override
232174
public List<String> getJobNames() {
233175
return jobInstanceDao.getJobNames();
234176
}
235177

236-
/*
237-
* (non-Javadoc)
238-
*
239-
* @see
240-
* org.springframework.batch.core.explore.JobExplorer#getJobInstanceCount(java.lang.
241-
* String)
242-
*/
243178
@Override
244179
public long getJobInstanceCount(@Nullable String jobName) throws NoSuchJobException {
245180
return jobInstanceDao.getJobInstanceCount(jobName);

spring-batch-core/src/main/java/org/springframework/batch/core/job/AbstractJob.java

-10
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,6 @@ public void setName(String name) {
158158
this.name = name;
159159
}
160160

161-
/*
162-
* (non-Javadoc)
163-
*
164-
* @see org.springframework.batch.core.domain.IJob#getName()
165-
*/
166161
@Override
167162
public String getName() {
168163
return name;
@@ -214,11 +209,6 @@ public void setJobParametersIncrementer(JobParametersIncrementer jobParametersIn
214209
this.jobParametersIncrementer = jobParametersIncrementer;
215210
}
216211

217-
/*
218-
* (non-Javadoc)
219-
*
220-
* @see org.springframework.batch.core.Job#getJobParametersIncrementer()
221-
*/
222212
@Override
223213
@Nullable
224214
public JobParametersIncrementer getJobParametersIncrementer() {

spring-batch-core/src/main/java/org/springframework/batch/core/job/SimpleJob.java

-5
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,6 @@ public void addStep(Step step) {
9494
this.steps.add(step);
9595
}
9696

97-
/*
98-
* (non-Javadoc)
99-
*
100-
* @see org.springframework.batch.core.job.AbstractJob#getStep(java.lang.String)
101-
*/
10297
@Override
10398
public Step getStep(String stepName) {
10499
for (Step step : this.steps) {

spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/DefaultStateTransitionComparator.java

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013 the original author or authors.
2+
* Copyright 2013-2023 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.
@@ -32,11 +32,6 @@ public class DefaultStateTransitionComparator implements Comparator<StateTransit
3232

3333
public static final String STATE_TRANSITION_COMPARATOR = "batch_state_transition_comparator";
3434

35-
/*
36-
* (non-Javadoc)
37-
*
38-
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
39-
*/
4035
@Override
4136
public int compare(StateTransition arg0, StateTransition arg1) {
4237
String value = arg1.getPattern();

spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/StateTransition.java

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2018 the original author or authors.
2+
* Copyright 2006-2023 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.
@@ -159,11 +159,6 @@ public boolean isEnd() {
159159
return next == null;
160160
}
161161

162-
/*
163-
* (non-Javadoc)
164-
*
165-
* @see java.lang.Object#toString()
166-
*/
167162
@Override
168163
public String toString() {
169164
return String.format("StateTransition: [state=%s, pattern=%s, next=%s]", state == null ? null : state.getName(),

spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/AbstractState.java

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2013 the original author or authors.
2+
* Copyright 2006-2023 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.
@@ -39,11 +39,6 @@ public String getName() {
3939
return name;
4040
}
4141

42-
/*
43-
* (non-Javadoc)
44-
*
45-
* @see java.lang.Object#toString()
46-
*/
4742
@Override
4843
public String toString() {
4944
return getClass().getSimpleName() + ": name=[" + name + "]";

spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/DecisionState.java

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2013 the original author or authors.
2+
* Copyright 2006-2023 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.
@@ -45,11 +45,6 @@ public FlowExecutionStatus handle(FlowExecutor executor) throws Exception {
4545
return decider.decide(executor.getJobExecution(), executor.getStepExecution());
4646
}
4747

48-
/*
49-
* (non-Javadoc)
50-
*
51-
* @see org.springframework.batch.core.job.flow.State#isEndState()
52-
*/
5348
@Override
5449
public boolean isEndState() {
5550
return false;

0 commit comments

Comments
 (0)