Files
spring-integration/spring-integration-file
Gary Russell f031867e16 INT-3089 Fix FileExistsMode.IGNORE
When writing files with this mode setting, the FWMH detected
that the final file already exists, but did not detect that
the temporary (default ....writing) file exists. This could
happen if two adapters were simulataneously processing the same
file.

Also, while a comment in the setter said an empty temp file
suffix is allowed, it did not work because the file rename
is performed unconditionally, fails, and throws an exception.

Add a check for the temporary file (if the suffix is not "").

Don't rename if the file was written in-place (no temp file suffix).

Add test cases for the FileExistsMode.IGNORE for both the final
and temporary files. Add a test where the temporary file suffix
is "", a ...writing file exists, the final file does not exist
and so is created by the handler. The ...writing file is untouched.
2013-07-16 09:43:33 -04:00
..
2013-07-16 09:43:33 -04:00
2012-09-05 16:55:34 -04:00