Skip to content

Commit 91aa17b

Browse files
committed
Polish f37fae6
* Update year in license header * Update Javadoc formatting
1 parent f37fae6 commit 91aa17b

File tree

1 file changed

+16
-9
lines changed
  • spring-batch-infrastructure/src/main/java/org/springframework/batch/item

1 file changed

+16
-9
lines changed

spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemProcessor.java

Lines changed: 16 additions & 9 deletions
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-2020 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.
@@ -20,28 +20,35 @@
2020
import org.springframework.lang.Nullable;
2121

2222
/**
23-
* Interface for item transformation. Given an item as input, this interface provides
23+
* Interface for item transformation. Given an item as input, this interface provides
2424
* an extension point which allows for the application of business logic in an item
25-
* oriented processing scenario. It should be noted that while it's possible to return
26-
* a different type than the one provided, it's not strictly necessary. Furthermore,
27-
* returning null indicates that the item should not be continued to be processed.
25+
* oriented processing scenario. It should be noted that while it's possible to return
26+
* a different type than the one provided, it's not strictly necessary. Furthermore,
27+
* returning {@code null} indicates that the item should not be continued to be processed.
2828
*
2929
* @author Robert Kasanicky
3030
* @author Dave Syer
3131
* @author Mahmoud Ben Hassine
32+
*
33+
* @param <I> type of input item
34+
* @param <O> type of output item
3235
*/
3336
public interface ItemProcessor<I, O> {
3437

3538
/**
3639
* Process the provided item, returning a potentially modified or new item for continued
37-
* processing. If the returned result is null, it is assumed that processing of the item
40+
* processing. If the returned result is {@code null}, it is assumed that processing of the item
3841
* should not continue.
3942
*
40-
* @param item to be processed. A {@code null} will never reach this method because the only possible sources
41-
* are ItemReader (which indicates no more items) and ItemProcessor (which indicates a filtered item).
43+
* A {@code null} item will never reach this method because the only possible sources are:
44+
* <ul>
45+
* <li>an {@link ItemReader} (which indicates no more items)</li>
46+
* <li>a previous {@link ItemProcessor} in a composite processor (which indicates a filtered item)</li>
47+
* </ul>
48+
*
49+
* @param item to be processed, never {@code null}.
4250
* @return potentially modified or new item for continued processing, {@code null} if processing of the
4351
* provided item should not continue.
44-
*
4552
* @throws Exception thrown if exception occurs during processing.
4653
*/
4754
@Nullable

0 commit comments

Comments
 (0)