Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added missing docs for batch.core and batch.core.configuration packages #4068

Closed

Conversation

cppwfs
Copy link
Contributor

@cppwfs cppwfs commented Feb 15, 2022

No description provided.

@@ -74,10 +74,21 @@

private final String exitDescription;

/**
* Constructor that accepts the exitCode and sets the exitDescription to an empty {@link String}.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change exitCode and exitDescription to exit code and exit description (that is, say it in English rather than Java).

public ExitStatus(String exitCode) {
this(exitCode, "");
}

/**
* Constructor that establishes the exitCode and the exitDescription for the {@link ExitStatus}.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change exitCode and exitDescription to exit code and exit description (that is, say it in English rather than Java).

@@ -98,45 +102,78 @@ public JobExecution(JobInstance job, Long id, @Nullable JobParameters jobParamet
/**
* Constructor for transient (unsaved) instances.
*
* @param job the enclosing {@link JobInstance}
* @param jobParameters {@link JobParameters} instance for this JobExecution.
* @param job The enclosing {@link JobInstance}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a period at the end.

@@ -297,6 +334,10 @@ public void setLastUpdated(Date lastUpdated) {
this.lastUpdated = lastUpdated;
}

/**
* Retrieve a list of exceptions.
* @return The {@link List} of {@link Throwable}s.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change "{@link Throwable}s." to "{@link Throwable} objects."

General rule: Don't try to make a plural out of something that needs to have its own formatting (a link, in this case). It nearly always causes rendering problems.

public JobParameters() {
this.parameters = new LinkedHashMap<>();
}

/**
* Constructor that is initialized with content of a {@link Map} that contains a string key and {@link JobParameter} value.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change "with content" to "with the content".

public static final String STRING_TYPE = "(string)";

/**
* Parameter key suffix representing the long type.
*/
public static final String LONG_TYPE = "(long)";

private static final String DOUBLE_TYPE = "(double)";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a similar description for this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aroo?

@@ -45,7 +45,7 @@
* <p>
* Implementation of {@link JobRepository} that stores JobInstances,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change JobInstances to job instances. (English rather than Java. Also, unless there is an object named JobInstances, it's an error to use the term.

@@ -45,7 +45,7 @@
* <p>
* Implementation of {@link JobRepository} that stores JobInstances,
* JobExecutions, and StepExecutions using the injected DAOs.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change "JobExections" and "StepExecutions" to job executions and step executions (respectively). Same comment as the previous line about not referring to objects that don't exist.

These two aren't your fault, I know. However, since we're here....

*/
public JobExecution(JobInstance job, JobParameters jobParameters) {
this(job, null, jobParameters);
}

/**
* Constructor that accepts the current job execution ID and {@link JobParameters}.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove "current".

public JobExecution(Long id, JobParameters jobParameters) {
this(null, id, jobParameters);
}

/**
* Constructor that accepts the current job execution ID.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove "current".

@cppwfs cppwfs force-pushed the BATCH-ADD-JAVADOC-CORE-CONFIG branch from 517fe11 to da9c74e Compare February 16, 2022 22:49
@@ -136,8 +136,8 @@ public void afterPropertiesSet() throws Exception {
}

/**
* Returns the {@link BatchConfigurer} if one is present in list. Create {@link BatchConfigurer} if configurers list is empty.
* If more than one configurer is present in the list then an {@link IllegalStateException} is thrown.
* If a {@link BatchConfigurer}, return it. If the configurers list is empty, create {@link BatchConfigurer}.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need "exists" before the first comma. My bad, I think.

@fmbenhassine
Copy link
Contributor

Rebased and merged as 4e35709. Thank you @cppwfs and @Buzzardo !

lcmarvin pushed a commit to lcmarvin/spring-batch that referenced this pull request Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants