Clarify the behaviour of MultiResourceItemWriter with regard to file creation

Resolves #4645
This commit is contained in:
Mahmoud Ben Hassine
2024-10-23 05:57:09 +02:00
parent fb03aab5a3
commit e4a7bd84df

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2023 the original author or authors.
* Copyright 2006-2024 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.
@@ -36,7 +36,11 @@ import org.springframework.util.ClassUtils;
* <p>
* Note that new resources are created only at chunk boundaries i.e. the number of items
* written into one resource is between the limit set by
* {@link #setItemCountLimitPerResource(int)} and (limit + chunk size).
* <p>
* This writer will create an output file only when there are items to write, which means
* there would be no empty file created if no items are passed (for example when all items
* are filtered or skipped during the processing phase).
* </p>
*
* @param <T> item type
* @author Robert Kasanicky