diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/package-info.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/package-info.java index 928d010d6..807d25ae4 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/package-info.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/package-info.java @@ -2,5 +2,9 @@ * Components for executing item processing asynchronously and writing the results when processing is complete. * * @author Michael Minella + * @author Mahmoud Ben Hassine */ -package org.springframework.batch.integration.async; \ No newline at end of file +@NonNullApi +package org.springframework.batch.integration.async; + +import org.springframework.lang.NonNullApi; diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkResponse.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkResponse.java index 3cec62df9..c2fba75fd 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkResponse.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2018 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. @@ -19,11 +19,13 @@ package org.springframework.batch.integration.chunk; import java.io.Serializable; import org.springframework.batch.core.StepContribution; +import org.springframework.lang.Nullable; /** * Encapsulates a response to processing a chunk of items, summarising the result as a {@link StepContribution}. * * @author Dave Syer + * @author Mahmoud Ben Hassine * */ public class ChunkResponse implements Serializable { @@ -50,7 +52,7 @@ public class ChunkResponse implements Serializable { this(status, sequence, jobId, stepContribution, null); } - public ChunkResponse(boolean status, int sequence, Long jobId, StepContribution stepContribution, String message) { + public ChunkResponse(boolean status, int sequence, Long jobId, StepContribution stepContribution, @Nullable String message) { this(status, sequence, jobId, stepContribution, message, false); } @@ -58,7 +60,7 @@ public class ChunkResponse implements Serializable { this(input.status, input.sequence, input.jobId, input.stepContribution, input.message, redelivered); } - public ChunkResponse(boolean status, int sequence, Long jobId, StepContribution stepContribution, String message, boolean redelivered) { + public ChunkResponse(boolean status, int sequence, Long jobId, StepContribution stepContribution, @Nullable String message, boolean redelivered) { this.status = status; this.sequence = sequence; this.jobId = jobId; diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/package-info.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/package-info.java index e09ccbf4c..e375ea564 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/package-info.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/package-info.java @@ -2,5 +2,9 @@ * Components for remote chunking. * * @author Michael Minella + * @author Mahmoud Ben Hassine */ -package org.springframework.batch.integration.chunk; \ No newline at end of file +@NonNullApi +package org.springframework.batch.integration.chunk; + +import org.springframework.lang.NonNullApi; diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/config/annotation/package-info.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/config/annotation/package-info.java new file mode 100644 index 000000000..94a55fff4 --- /dev/null +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/config/annotation/package-info.java @@ -0,0 +1,25 @@ +/* + * Copyright 2018 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * APIs for the configuration of Spring Integration components through annotations. + * + * @author Mahmoud Ben Hassine + */ +@NonNullApi +package org.springframework.batch.integration.config.annotation; + +import org.springframework.lang.NonNullApi; diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/config/xml/package-info.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/config/xml/package-info.java new file mode 100644 index 000000000..adac93a13 --- /dev/null +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/config/xml/package-info.java @@ -0,0 +1,25 @@ +/* + * Copyright 2018 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * APIs for the configuration of Spring Integration components through XML. + * + * @author Mahmoud Ben Hassine + */ +@NonNullApi +package org.springframework.batch.integration.config.xml; + +import org.springframework.lang.NonNullApi; diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/package-info.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/package-info.java index 7ad7ab459..0c5d640f4 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/package-info.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/package-info.java @@ -2,5 +2,9 @@ * Message based job launching components. * * @author Michael Minella + * @author Mahmoud Ben Hassine */ -package org.springframework.batch.integration.launch; \ No newline at end of file +@NonNullApi +package org.springframework.batch.integration.launch; + +import org.springframework.lang.NonNullApi; diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/MessageChannelPartitionHandler.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/MessageChannelPartitionHandler.java index db7356fe0..36f505a3f 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/MessageChannelPartitionHandler.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/MessageChannelPartitionHandler.java @@ -213,7 +213,7 @@ public class MessageChannelPartitionHandler implements PartitionHandler, Initial final Set split = stepExecutionSplitter.split(masterStepExecution, gridSize); if(CollectionUtils.isEmpty(split)) { - return null; + return split; } int count = 0; diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/package-info.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/package-info.java index 0615357c3..e8b25768c 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/package-info.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/package-info.java @@ -2,5 +2,9 @@ * Remote partitioning components. * * @author Michael Minella + * @author Mahmoud Ben Hassine */ -package org.springframework.batch.integration.partition; \ No newline at end of file +@NonNullApi +package org.springframework.batch.integration.partition; + +import org.springframework.lang.NonNullApi; diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/step/package-info.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/step/package-info.java new file mode 100644 index 000000000..7ba0cd3d3 --- /dev/null +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/step/package-info.java @@ -0,0 +1,25 @@ +/* + * Copyright 2018 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Support classes related to steps when used with Spring Integration. + * + * @author Mahmoud Ben Hassine + */ +@NonNullApi +package org.springframework.batch.integration.step; + +import org.springframework.lang.NonNullApi;