davsclaus opened a new pull request, #24750:
URL: https://github.com/apache/camel/pull/24750

   ## Summary
   
   _Claude Code on behalf of davsclaus_
   
   `GenericFileProducer.handleExistingTarget` (the non-eager path used when 
writing via `tempFileName`/`tempPrefix` with `eagerDeleteTargetFile=false`) 
handled `Ignore`, `Fail`, and `Override` but had **no `Move` branch**. This 
meant `fileExist=Move` with `eagerDeleteTargetFile=false` and `tempFileName` 
silently overwrote the existing target instead of moving it to the 
`moveExisting` destination.
   
   The eager twin `handleExistingTargetEager` has had the `Move` branch since 
CAMEL-15822 (2020), but the non-eager method was never patched.
   
   ### Changes
   
   - **`GenericFileProducer.java`**: Added the missing `Move` branch to 
`handleExistingTarget`, mirroring `handleExistingTargetEager` — calls 
`endpoint.getMoveExistingFileStrategy().moveExistingFile()`.
   - **`FileProducerMoveExistingTest.java`**: Updated 
`testFailOnMoveExistingFileExistsEagerDeleteFalseTempFileName` to assert 
correct behavior: when the move destination already exists and 
`eagerDeleteTargetFile=false`, the move strategy should throw 
`GenericFileOperationFailedException` (consistent with the non-tempFileName 
variant `testFailOnMoveExistingFileExistsEagerDeleteFalse`).
   
   ## Test plan
   
   - [x] `FileProducerMoveExistingTest` — all 14 tests pass (including the 
corrected test)
   - [x] Full reactor build passes (`mvn clean install -DskipTests`)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   Co-Authored-By: Claude Opus 4.6 <[email protected]>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to