Skip to content

Commit f82c16b

Browse files
committed
Fix javadoc errors and warnings
Resolves #1624
1 parent 060c96f commit f82c16b

File tree

151 files changed

+316
-362
lines changed

Some content is hidden

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

151 files changed

+316
-362
lines changed

pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@
8787
<mongodb-driver-sync.version>4.9.1</mongodb-driver-sync.version>
8888
<junit-jupiter.version>5.9.3</junit-jupiter.version>
8989

90+
<!-- provided dependencies -->
91+
<jsr305.version>3.0.2</jsr305.version>
92+
9093
<!-- test dependencies -->
9194
<micrometer-tracing.version>1.0.5</micrometer-tracing.version>
9295

spring-batch-core/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,14 @@
328328
</exclusion>
329329
</exclusions>
330330
</dependency>
331+
332+
<!-- provided dependencies -->
333+
<dependency>
334+
<groupId>com.google.code.findbugs</groupId>
335+
<artifactId>jsr305</artifactId>
336+
<version>${jsr305.version}</version>
337+
<scope>provided</scope>
338+
</dependency>
331339
</dependencies>
332340

333341
</project>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class Entity implements Serializable {
3939

4040
/**
4141
* Default constructor for {@link Entity}.
42-
*
42+
* <p>
4343
* The ID defaults to zero.
4444
*/
4545
public Entity() {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
/**
2525
* Value object used to carry information about the status of a job or step execution.
26-
*
26+
* <p>
2727
* {@code ExitStatus} is immutable and, therefore, thread-safe.
2828
*
2929
* @author Dave Syer

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public void setCreateTime(LocalDateTime createTime) {
305305
/**
306306
* Package-private method for re-constituting the step executions from existing
307307
* instances.
308-
* @param The {@code stepExecution} execution to be added.
308+
* @param stepExecution The {@code stepExecution} execution to be added.
309309
*/
310310
void addStepExecution(StepExecution stepExecution) {
311311
stepExecutions.add(stepExecution);

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

Lines changed: 2 additions & 2 deletions
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.
@@ -22,7 +22,7 @@
2222
* Batch domain object representing a uniquely identifiable job run. {@code JobInstance}
2323
* can be restarted multiple times in case of execution failure, and its lifecycle ends
2424
* with first successful execution.
25-
*
25+
* <p>
2626
* Trying to execute an existing {@code JobInstance} that has already completed
2727
* successfully results in an error. An error is also raised for an attempt to restart a
2828
* failed {@code JobInstance} if the {@code Job} is not restartable.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
* order to determine if one {@code JobParameters} object equals another. Furthermore,
4141
* because these parameters need to be persisted, it is vital that the types added are
4242
* restricted.
43-
*
43+
* <p>
4444
* This class is immutable and, therefore, thread-safe.
4545
*
4646
* @author Lucas Ward

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

Lines changed: 2 additions & 2 deletions
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.
@@ -39,7 +39,7 @@ default void beforeStep(StepExecution stepExecution) {
3939
* Give a listener a chance to modify the exit status from a step. The value returned
4040
* is combined with the normal exit status by using
4141
* {@link ExitStatus#and(ExitStatus)}.
42-
*
42+
* <p>
4343
* Called after execution of the step's processing logic (whether successful or
4444
* failed). Throwing an exception in this method has no effect, as it is only logged.
4545
* @param stepExecution a {@link StepExecution} instance.

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
/**
7575
* Base {@link Configuration} class that provides common JDBC-based infrastructure beans
7676
* for enabling and using Spring Batch.
77-
*
77+
* <p>
7878
* This configuration class configures and registers the following beans in the
7979
* application context:
8080
*
@@ -89,10 +89,8 @@
8989
* </ul>
9090
*
9191
* Customization is possible by extending the class and overriding getters.
92-
*
93-
* A typical usage of this class is as follows:
94-
*
95-
* <pre class="code">
92+
* <p>
93+
* A typical usage of this class is as follows: <pre class="code">
9694
* &#064;Configuration
9795
* public class MyJobConfiguration extends DefaultBatchConfiguration {
9896
*

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

Lines changed: 1 addition & 4 deletions
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.
@@ -138,9 +138,6 @@ private final class ResourceXmlApplicationContext extends GenericXmlApplicationC
138138

139139
private final ApplicationContextHelper helper;
140140

141-
/**
142-
* @param parent
143-
*/
144141
public ResourceXmlApplicationContext(ConfigurableApplicationContext parent, Object... resources) {
145142

146143
class ResourceXmlApplicationContextHelper extends ApplicationContextHelper {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ else if (refElements.size() == 1) {
265265

266266
/**
267267
* Handle the adapter method attribute by using an
268-
* {@link AbstractMethodInvokingDelegator}.
268+
* {@link org.springframework.batch.item.adapter.AbstractMethodInvokingDelegator}.
269269
*/
270270
private void handleAdapterMethodAttribute(String propertyName, String adapterClassName,
271271
MutablePropertyValues stepPvs, Element element) {

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2021 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.
@@ -60,8 +60,8 @@ public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
6060
/**
6161
* Automatically inject job-repository from a job into its steps. Only inject if the
6262
* step is an AbstractStep or StepParserStepFactoryBean.
63-
* @param beanName
64-
* @param beanFactory
63+
* @param beanName the bean name
64+
* @param beanFactory the bean factory
6565
*/
6666
private void injectJobRepositoryIntoSteps(String beanName, ConfigurableListableBeanFactory beanFactory) {
6767
BeanDefinition bd = beanFactory.getBeanDefinition(beanName);
@@ -87,8 +87,8 @@ private void injectJobRepositoryIntoSteps(String beanName, ConfigurableListableB
8787
/**
8888
* If any of the beans in the parent hierarchy is a &lt;step/&gt; with a
8989
* &lt;tasklet/&gt;, then the bean class must be {@link StepParserStepFactoryBean}.
90-
* @param beanName
91-
* @param beanFactory
90+
* @param beanName the bean name
91+
* @param beanFactory the bean factory
9292
*/
9393
private void overrideStepClass(String beanName, ConfigurableListableBeanFactory beanFactory) {
9494
BeanDefinition bd = beanFactory.getBeanDefinition(beanName);
@@ -111,8 +111,8 @@ public Object postProcessBeforeInitialization(Object bean, String beanName) thro
111111
* <li>Inject "transactionManager" into any {@link StepParserStepFactoryBean} without
112112
* a transactionManager.
113113
* </ul>
114-
* @param bean
115-
* @return
114+
* @param bean the bean object
115+
* @return the bean with default collaborators injected into it
116116
*/
117117
private Object injectDefaults(Object bean) {
118118
if (bean instanceof JobParserJobFactoryBean) {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private static void checkForScope(ParserContext parserContext, Object source, St
103103

104104
/**
105105
* Register a {@link Comparator} to be used to sort {@link StateTransition} objects.
106-
* @param parserContext
106+
* @param parserContext the parser context
107107
*/
108108
private static void addStateTransitionComparator(ParserContext parserContext) {
109109
BeanDefinitionRegistry registry = parserContext.getRegistry();
@@ -122,7 +122,7 @@ private static boolean stateTransitionComparatorAlreadyDefined(BeanDefinitionReg
122122

123123
/**
124124
* Register a {@code RangePropertyEditor}, if one does not already exist.
125-
* @param parserContext
125+
* @param parserContext the parser context
126126
*/
127127
private static void addRangePropertyEditor(ParserContext parserContext) {
128128
BeanDefinitionRegistry registry = parserContext.getRegistry();
@@ -164,7 +164,7 @@ else if (entry.getKey() instanceof String) {
164164

165165
/**
166166
* Add a core name postprocessor.
167-
* @param parserContext
167+
* @param parserContext the parser context
168168
*/
169169
private static void addCoreNamespacePostProcessor(ParserContext parserContext) {
170170
BeanDefinitionRegistry registry = parserContext.getRegistry();

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-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.
@@ -137,8 +137,8 @@ private String getNext(String next) {
137137
* Convenience method to get a state that proxies the input but with a different name,
138138
* appropriate to this flow. If the state is a {@link StepState}, the step name is
139139
* also changed.
140-
* @param state
141-
* @return
140+
* @param state the state to proxy
141+
* @return the proxy state
142142
*/
143143
private State getProxyState(State state) {
144144
String oldName = state.getName();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ protected void validateFaultTolerantSettings() {
552552
* present).
553553
* @param value The value of the other field.
554554
* @param twoWayDependency Set to {@code true} if both depend on each other.
555-
* @throws an IllegalArgumentException if either condition is violated
555+
* @throws IllegalArgumentException if either condition is violated
556556
*/
557557
private void validateDependency(String dependentName, Object dependentValue, String name, Object value,
558558
boolean twoWayDependency) {

spring-batch-core/src/main/java/org/springframework/batch/core/converter/DateToStringConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
/**
2323
* {@link Converter} implementation from {@link java.util.Date} to {@link String}.
24-
*
24+
* <p>
2525
* This converter formats dates according to the
2626
* {@link java.time.format.DateTimeFormatter#ISO_INSTANT} format.
2727
*

spring-batch-core/src/main/java/org/springframework/batch/core/converter/DefaultJobParametersConverter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
/**
3333
* Converter for {@link JobParameters} instances that uses a simple naming convention for
3434
* converting job parameters. The expected notation is the following:
35-
*
35+
* <p>
3636
* key=value,type,identifying
37-
*
37+
* <p>
3838
* where:
3939
*
4040
* <ul>
@@ -47,12 +47,12 @@
4747
*
4848
* For example, schedule.date=2022-12-12,java.time.LocalDate will be converted to an
4949
* identifying job parameter of type {@link java.time.LocalDate} with value "2022-12-12".
50-
*
50+
* <p>
5151
* The literal values are converted to the target type by using the default Spring
5252
* conversion service, augmented if necessary by any custom converters. The conversion
5353
* service should be configured with a converter to and from string literals to job
5454
* parameter types.
55-
*
55+
* <p>
5656
* By default, the Spring conversion service is augmented to support the conversion of the
5757
* following types:
5858
*

spring-batch-core/src/main/java/org/springframework/batch/core/converter/JsonJobParametersConverter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
/**
2525
* Converter for {@link JobParameters} instances that uses a JSON naming convention for
2626
* converting job parameters. The expected notation is the following:
27-
*
27+
* <p>
2828
* key='{"value": "parameterStringLiteralValue",
2929
* "type":"fully.qualified.name.of.the.parameter.Type", "identifying": "booleanValue"}'
30-
*
30+
* <p>
3131
* where:
3232
*
3333
* <ul>
@@ -41,12 +41,12 @@
4141
* For example, schedule.date={"value": "2022-12-12", "type":"java.time.LocalDate",
4242
* "identifying": "false"} will be converted to a non identifying job parameter of type
4343
* {@link java.time.LocalDate} with value "2022-12-12".
44-
*
44+
* <p>
4545
* The literal values are converted to the correct type by using the default Spring
4646
* conversion service, augmented if necessary by any custom converters. The conversion
4747
* service should be configured with a converter to and from string literals to job
4848
* parameter types.
49-
*
49+
* <p>
5050
* By default, the Spring conversion service is augmented to support the conversion of the
5151
* following types:
5252
*

spring-batch-core/src/main/java/org/springframework/batch/core/converter/LocalDateTimeToStringConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
/**
2424
* {@link Converter} implementation from {@link LocalDateTime} to {@link String}.
25-
*
25+
* <p>
2626
* This converter formats dates according to the
2727
* {@link DateTimeFormatter#ISO_LOCAL_DATE_TIME} format.
2828
*

spring-batch-core/src/main/java/org/springframework/batch/core/converter/LocalDateToStringConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
/**
2323
* {@link Converter} implementation from {@link LocalDate} to {@link String}.
24-
*
24+
* <p>
2525
* This converter formats dates according to the
2626
* {@link java.time.format.DateTimeFormatter#ISO_LOCAL_DATE} format.
2727
*

spring-batch-core/src/main/java/org/springframework/batch/core/converter/LocalTimeToStringConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
/**
2424
* {@link Converter} implementation from {@link LocalTime} to {@link String}.
25-
*
25+
* <p>
2626
* This converter formats times according to the {@link DateTimeFormatter#ISO_LOCAL_TIME}
2727
* format.
2828
*

spring-batch-core/src/main/java/org/springframework/batch/core/converter/StringToDateConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
/**
2424
* {@link Converter} implementation from {@link String} to {@link java.util.Date}.
25-
*
25+
* <p>
2626
* This converter expects strings in the
2727
* {@link java.time.format.DateTimeFormatter#ISO_INSTANT} format.
2828
*

spring-batch-core/src/main/java/org/springframework/batch/core/converter/StringToLocalDateConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
/**
2323
* {@link Converter} implementation from {@link String} to {@link LocalDate}.
24-
*
24+
* <p>
2525
* This converter expects strings in the
2626
* {@link java.time.format.DateTimeFormatter#ISO_LOCAL_DATE} format.
2727
*

spring-batch-core/src/main/java/org/springframework/batch/core/converter/StringToLocalDateTimeConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
/**
2323
* {@link Converter} implementation from {@link String} to {@link LocalDateTime}.
24-
*
24+
* <p>
2525
* This converter expects strings in the
2626
* {@link java.time.format.DateTimeFormatter#ISO_LOCAL_DATE_TIME} format.
2727
*

spring-batch-core/src/main/java/org/springframework/batch/core/converter/StringToLocalTimeConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
/**
2323
* {@link Converter} implementation from {@link String} to {@link LocalTime}.
24-
*
24+
* <p>
2525
* This converter expects strings in the
2626
* {@link java.time.format.DateTimeFormatter#ISO_LOCAL_TIME} format.
2727
*

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

Lines changed: 3 additions & 3 deletions
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.
@@ -113,7 +113,7 @@ default JobInstance getJobInstance(String jobName, JobParameters jobParameters)
113113
* depending on the implementation. In that case, use
114114
* {@link #getStepExecution(Long, Long)} to hydrate them.
115115
* @param jobInstance The {@link JobInstance} to query.
116-
* @return the set of all executions for the specified {@link JobInstance}.
116+
* @return the list of all executions for the specified {@link JobInstance}.
117117
*/
118118
List<JobExecution> getJobExecutions(JobInstance jobInstance);
119119

@@ -145,7 +145,7 @@ default JobExecution getLastJobExecution(JobInstance jobInstance) {
145145
/**
146146
* Query the repository for all unique {@link JobInstance} names (sorted
147147
* alphabetically).
148-
* @return the set of job names that have been executed.
148+
* @return the list of job names that have been executed.
149149
*/
150150
List<String> getJobNames();
151151

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public void setSerializer(ExecutionContextSerializer serializer) {
9898

9999
/**
100100
* Sets the data source.
101-
*
101+
* <p>
102102
* Public setter for the {@link DataSource}.
103103
* @param dataSource A {@code DataSource}.
104104
*/

0 commit comments

Comments
 (0)