Skip to content

Commit

Permalink
Fix javadoc errors and warnings
Browse files Browse the repository at this point in the history
Resolves #1624
  • Loading branch information
fmbenhassine committed Jul 6, 2023
1 parent 060c96f commit f82c16b
Show file tree
Hide file tree
Showing 151 changed files with 316 additions and 362 deletions.
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@
<mongodb-driver-sync.version>4.9.1</mongodb-driver-sync.version>
<junit-jupiter.version>5.9.3</junit-jupiter.version>

<!-- provided dependencies -->
<jsr305.version>3.0.2</jsr305.version>

<!-- test dependencies -->
<micrometer-tracing.version>1.0.5</micrometer-tracing.version>

Expand Down
8 changes: 8 additions & 0 deletions spring-batch-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,14 @@
</exclusion>
</exclusions>
</dependency>

<!-- provided dependencies -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>${jsr305.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class Entity implements Serializable {

/**
* Default constructor for {@link Entity}.
*
* <p>
* The ID defaults to zero.
*/
public Entity() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/**
* Value object used to carry information about the status of a job or step execution.
*
* <p>
* {@code ExitStatus} is immutable and, therefore, thread-safe.
*
* @author Dave Syer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ public void setCreateTime(LocalDateTime createTime) {
/**
* Package-private method for re-constituting the step executions from existing
* instances.
* @param The {@code stepExecution} execution to be added.
* @param stepExecution The {@code stepExecution} execution to be added.
*/
void addStepExecution(StepExecution stepExecution) {
stepExecutions.add(stepExecution);
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -22,7 +22,7 @@
* Batch domain object representing a uniquely identifiable job run. {@code JobInstance}
* can be restarted multiple times in case of execution failure, and its lifecycle ends
* with first successful execution.
*
* <p>
* Trying to execute an existing {@code JobInstance} that has already completed
* successfully results in an error. An error is also raised for an attempt to restart a
* failed {@code JobInstance} if the {@code Job} is not restartable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* order to determine if one {@code JobParameters} object equals another. Furthermore,
* because these parameters need to be persisted, it is vital that the types added are
* restricted.
*
* <p>
* This class is immutable and, therefore, thread-safe.
*
* @author Lucas Ward
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -39,7 +39,7 @@ default void beforeStep(StepExecution stepExecution) {
* Give a listener a chance to modify the exit status from a step. The value returned
* is combined with the normal exit status by using
* {@link ExitStatus#and(ExitStatus)}.
*
* <p>
* Called after execution of the step's processing logic (whether successful or
* failed). Throwing an exception in this method has no effect, as it is only logged.
* @param stepExecution a {@link StepExecution} instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
/**
* Base {@link Configuration} class that provides common JDBC-based infrastructure beans
* for enabling and using Spring Batch.
*
* <p>
* This configuration class configures and registers the following beans in the
* application context:
*
Expand All @@ -89,10 +89,8 @@
* </ul>
*
* Customization is possible by extending the class and overriding getters.
*
* A typical usage of this class is as follows:
*
* <pre class="code">
* <p>
* A typical usage of this class is as follows: <pre class="code">
* &#064;Configuration
* public class MyJobConfiguration extends DefaultBatchConfiguration {
*
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -138,9 +138,6 @@ private final class ResourceXmlApplicationContext extends GenericXmlApplicationC

private final ApplicationContextHelper helper;

/**
* @param parent
*/
public ResourceXmlApplicationContext(ConfigurableApplicationContext parent, Object... resources) {

class ResourceXmlApplicationContextHelper extends ApplicationContextHelper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ else if (refElements.size() == 1) {

/**
* Handle the adapter method attribute by using an
* {@link AbstractMethodInvokingDelegator}.
* {@link org.springframework.batch.item.adapter.AbstractMethodInvokingDelegator}.
*/
private void handleAdapterMethodAttribute(String propertyName, String adapterClassName,
MutablePropertyValues stepPvs, Element element) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2006-2021 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.
Expand Down Expand Up @@ -60,8 +60,8 @@ public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
/**
* Automatically inject job-repository from a job into its steps. Only inject if the
* step is an AbstractStep or StepParserStepFactoryBean.
* @param beanName
* @param beanFactory
* @param beanName the bean name
* @param beanFactory the bean factory
*/
private void injectJobRepositoryIntoSteps(String beanName, ConfigurableListableBeanFactory beanFactory) {
BeanDefinition bd = beanFactory.getBeanDefinition(beanName);
Expand All @@ -87,8 +87,8 @@ private void injectJobRepositoryIntoSteps(String beanName, ConfigurableListableB
/**
* If any of the beans in the parent hierarchy is a &lt;step/&gt; with a
* &lt;tasklet/&gt;, then the bean class must be {@link StepParserStepFactoryBean}.
* @param beanName
* @param beanFactory
* @param beanName the bean name
* @param beanFactory the bean factory
*/
private void overrideStepClass(String beanName, ConfigurableListableBeanFactory beanFactory) {
BeanDefinition bd = beanFactory.getBeanDefinition(beanName);
Expand All @@ -111,8 +111,8 @@ public Object postProcessBeforeInitialization(Object bean, String beanName) thro
* <li>Inject "transactionManager" into any {@link StepParserStepFactoryBean} without
* a transactionManager.
* </ul>
* @param bean
* @return
* @param bean the bean object
* @return the bean with default collaborators injected into it
*/
private Object injectDefaults(Object bean) {
if (bean instanceof JobParserJobFactoryBean) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private static void checkForScope(ParserContext parserContext, Object source, St

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

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

/**
* Add a core name postprocessor.
* @param parserContext
* @param parserContext the parser context
*/
private static void addCoreNamespacePostProcessor(ParserContext parserContext) {
BeanDefinitionRegistry registry = parserContext.getRegistry();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-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.
Expand Down Expand Up @@ -137,8 +137,8 @@ private String getNext(String next) {
* Convenience method to get a state that proxies the input but with a different name,
* appropriate to this flow. If the state is a {@link StepState}, the step name is
* also changed.
* @param state
* @return
* @param state the state to proxy
* @return the proxy state
*/
private State getProxyState(State state) {
String oldName = state.getName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ protected void validateFaultTolerantSettings() {
* present).
* @param value The value of the other field.
* @param twoWayDependency Set to {@code true} if both depend on each other.
* @throws an IllegalArgumentException if either condition is violated
* @throws IllegalArgumentException if either condition is violated
*/
private void validateDependency(String dependentName, Object dependentValue, String name, Object value,
boolean twoWayDependency) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/**
* {@link Converter} implementation from {@link java.util.Date} to {@link String}.
*
* <p>
* This converter formats dates according to the
* {@link java.time.format.DateTimeFormatter#ISO_INSTANT} format.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
/**
* Converter for {@link JobParameters} instances that uses a simple naming convention for
* converting job parameters. The expected notation is the following:
*
* <p>
* key=value,type,identifying
*
* <p>
* where:
*
* <ul>
Expand All @@ -47,12 +47,12 @@
*
* For example, schedule.date=2022-12-12,java.time.LocalDate will be converted to an
* identifying job parameter of type {@link java.time.LocalDate} with value "2022-12-12".
*
* <p>
* The literal values are converted to the target type by using the default Spring
* conversion service, augmented if necessary by any custom converters. The conversion
* service should be configured with a converter to and from string literals to job
* parameter types.
*
* <p>
* By default, the Spring conversion service is augmented to support the conversion of the
* following types:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
/**
* Converter for {@link JobParameters} instances that uses a JSON naming convention for
* converting job parameters. The expected notation is the following:
*
* <p>
* key='{"value": "parameterStringLiteralValue",
* "type":"fully.qualified.name.of.the.parameter.Type", "identifying": "booleanValue"}'
*
* <p>
* where:
*
* <ul>
Expand All @@ -41,12 +41,12 @@
* For example, schedule.date={"value": "2022-12-12", "type":"java.time.LocalDate",
* "identifying": "false"} will be converted to a non identifying job parameter of type
* {@link java.time.LocalDate} with value "2022-12-12".
*
* <p>
* The literal values are converted to the correct type by using the default Spring
* conversion service, augmented if necessary by any custom converters. The conversion
* service should be configured with a converter to and from string literals to job
* parameter types.
*
* <p>
* By default, the Spring conversion service is augmented to support the conversion of the
* following types:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

/**
* {@link Converter} implementation from {@link LocalDateTime} to {@link String}.
*
* <p>
* This converter formats dates according to the
* {@link DateTimeFormatter#ISO_LOCAL_DATE_TIME} format.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/**
* {@link Converter} implementation from {@link LocalDate} to {@link String}.
*
* <p>
* This converter formats dates according to the
* {@link java.time.format.DateTimeFormatter#ISO_LOCAL_DATE} format.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

/**
* {@link Converter} implementation from {@link LocalTime} to {@link String}.
*
* <p>
* This converter formats times according to the {@link DateTimeFormatter#ISO_LOCAL_TIME}
* format.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

/**
* {@link Converter} implementation from {@link String} to {@link java.util.Date}.
*
* <p>
* This converter expects strings in the
* {@link java.time.format.DateTimeFormatter#ISO_INSTANT} format.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/**
* {@link Converter} implementation from {@link String} to {@link LocalDate}.
*
* <p>
* This converter expects strings in the
* {@link java.time.format.DateTimeFormatter#ISO_LOCAL_DATE} format.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/**
* {@link Converter} implementation from {@link String} to {@link LocalDateTime}.
*
* <p>
* This converter expects strings in the
* {@link java.time.format.DateTimeFormatter#ISO_LOCAL_DATE_TIME} format.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/**
* {@link Converter} implementation from {@link String} to {@link LocalTime}.
*
* <p>
* This converter expects strings in the
* {@link java.time.format.DateTimeFormatter#ISO_LOCAL_TIME} format.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -113,7 +113,7 @@ default JobInstance getJobInstance(String jobName, JobParameters jobParameters)
* depending on the implementation. In that case, use
* {@link #getStepExecution(Long, Long)} to hydrate them.
* @param jobInstance The {@link JobInstance} to query.
* @return the set of all executions for the specified {@link JobInstance}.
* @return the list of all executions for the specified {@link JobInstance}.
*/
List<JobExecution> getJobExecutions(JobInstance jobInstance);

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void setSerializer(ExecutionContextSerializer serializer) {

/**
* Sets the data source.
*
* <p>
* Public setter for the {@link DataSource}.
* @param dataSource A {@code DataSource}.
*/
Expand Down
Loading

0 comments on commit f82c16b

Please sign in to comment.