From 00abd5e262ae56b990894e41bb1e329d8b5ca128 Mon Sep 17 00:00:00 2001 From: Michael Minella Date: Tue, 23 Sep 2014 14:28:43 -0500 Subject: [PATCH] Update javadoc to remove javadoc warnings --- .../org/springframework/batch/item/ItemReader.java | 1 + .../org/springframework/batch/item/ItemStream.java | 4 +++- .../org/springframework/batch/item/ItemWriter.java | 3 ++- .../batch/item/database/JdbcBatchItemWriter.java | 2 +- .../batch/item/ldif/RecordCallbackHandler.java | 2 +- .../item/mail/javamail/MimeMessageItemWriter.java | 13 ++++++------- .../AbstractItemCountingItemStreamItemReader.java | 7 ++++++- .../org/springframework/batch/poller/Poller.java | 2 +- 8 files changed, 21 insertions(+), 13 deletions(-) diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemReader.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemReader.java index a96eff109..4ccd0233c 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemReader.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemReader.java @@ -52,6 +52,7 @@ public interface ItemReader { * with the input data. Assume potentially transient, so subsequent calls to * read might succeed. * @throws Exception if an there is a non-specific error. + * @return T the item to be processed */ T read() throws Exception, UnexpectedInputException, ParseException, NonTransientResourceException; diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemStream.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemStream.java index 7bfa163d9..8423162bc 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemStream.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemStream.java @@ -30,7 +30,9 @@ public interface ItemStream { /** * Open the stream for the provided {@link ExecutionContext}. - * + * + * @param executionContext current step's {@link org.springframework.batch.item.ExecutionContext}. Will be the + * executionContext from the last run of the step on a restart. * @throws IllegalArgumentException if context is null */ void open(ExecutionContext executionContext) throws ItemStreamException; diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemWriter.java index 06e61e106..4dcdf246b 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemWriter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemWriter.java @@ -41,7 +41,8 @@ public interface ItemWriter { /** * Process the supplied data element. Will not be called with any null items * in normal operation. - * + * + * @param items items to be written * @throws Exception if there are errors. The framework will catch the * exception and convert or rethrow it as appropriate. */ diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcBatchItemWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcBatchItemWriter.java index 0f1f33390..c43e22b88 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcBatchItemWriter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcBatchItemWriter.java @@ -117,7 +117,7 @@ public class JdbcBatchItemWriter implements ItemWriter, InitializingBean { /** * Public setter for the data source for injection purposes. * - * @param dataSource + * @param dataSource {@link javax.sql.DataSource} to use for querying against */ public void setDataSource(DataSource dataSource) { if (namedParameterJdbcTemplate == null) { diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ldif/RecordCallbackHandler.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ldif/RecordCallbackHandler.java index 9e2a3af29..3eb1465fe 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ldif/RecordCallbackHandler.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ldif/RecordCallbackHandler.java @@ -29,7 +29,7 @@ public interface RecordCallbackHandler { /** * Execute operations on the supplied record. * - * @param attributes + * @param attributes represents the record */ void handleRecord(LdapAttributes attributes); diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/mail/javamail/MimeMessageItemWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/mail/javamail/MimeMessageItemWriter.java index d0ad79804..5b0fe9295 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/mail/javamail/MimeMessageItemWriter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/mail/javamail/MimeMessageItemWriter.java @@ -15,12 +15,6 @@ */ package org.springframework.batch.item.mail.javamail; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import javax.mail.internet.MimeMessage; - import org.springframework.batch.item.ItemWriter; import org.springframework.batch.item.mail.DefaultMailErrorHandler; import org.springframework.batch.item.mail.MailErrorHandler; @@ -31,6 +25,11 @@ import org.springframework.mail.javamail.JavaMailSender; import org.springframework.mail.javamail.MimeMailMessage; import org.springframework.util.Assert; +import javax.mail.internet.MimeMessage; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + /** *

* A simple {@link ItemWriter} that can send mail messages. If it fails there is @@ -68,7 +67,7 @@ public class MimeMessageItemWriter implements ItemWriter { /** * A {@link JavaMailSender} to be used to send messages in {@link #write(List)}. * - * @param mailSender + * @param mailSender service for doing the work of sending a MIME message */ public void setJavaMailSender(JavaMailSender mailSender) { this.mailSender = mailSender; diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/AbstractItemCountingItemStreamItemReader.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/AbstractItemCountingItemStreamItemReader.java index 8274779fd..eded4a8ec 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/AbstractItemCountingItemStreamItemReader.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/AbstractItemCountingItemStreamItemReader.java @@ -49,17 +49,19 @@ public abstract class AbstractItemCountingItemStreamItemReader extends Abstra * Read next item from input. * * @return item - * @throws Exception + * @throws Exception Allows subclasses to throw checked exceptions for interpretation by the framework */ protected abstract T doRead() throws Exception; /** * Open resources necessary to start reading input. + * @throws Exception Allows subclasses to throw checked exceptions for interpretation by the framework */ protected abstract void doOpen() throws Exception; /** * Close the resources opened in {@link #doOpen()}. + * @throws Exception Allows subclasses to throw checked exceptions for interpretation by the framework */ protected abstract void doClose() throws Exception; @@ -67,6 +69,9 @@ public abstract class AbstractItemCountingItemStreamItemReader extends Abstra * Move to the given item index. Subclasses should override this method if * there is a more efficient way of moving to given index than re-reading * the input using {@link #doRead()}. + * + * @param itemIndex index of item (0 based) to jump to. + * @throws Exception Allows subclasses to throw checked exceptions for interpretation by the framework */ protected void jumpToItem(int itemIndex) throws Exception { for (int i = 0; i < itemIndex; i++) { diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/poller/Poller.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/poller/Poller.java index 8d3f5bc34..ef1969066 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/poller/Poller.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/poller/Poller.java @@ -50,7 +50,7 @@ public interface Poller { * * @param callable a {@link Callable} to use to retrieve a result * @return a future which itself can be used to get the result - * + * @throws java.lang.Exception */ Future poll(Callable callable) throws Exception;