mayurbm commented on PR #25760:
URL: https://github.com/apache/camel/pull/25760#issuecomment-5423671660

   ### Update — narrowed to null-guard only
   
   Removed the `null` value and already-correct-type fast-path short-circuits 
added in the initial commit. Those change existing converter call semantics 
(callers may rely on the converter being invoked even for matching types) and 
are outside the scope of this bug fix.
   
   The PR now contains only the minimal change: a null guard on the 
`TypeConverter` result, replacing the bare `NullPointerException` with a 
descriptive `IllegalStateException`. Same pattern as CAMEL-24489.
   
   **Changes: 2 files**
   - `ExchangeHelper.java` — null guard only in `convertToType` and 
`convertToMandatoryType`
   - `ExchangeHelperNullTypeConverterTest.java` — 4 tests (null converter with 
value, null converter with null value, null exchange, mandatory type)
   
   Local validation:
   - `mvn formatter:format impsort:sort` — no changes needed
   - `Tests run: 4, Failures: 0, Errors: 0`


-- 
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