mayurbm commented on PR #25871:
URL: https://github.com/apache/camel/pull/25871#issuecomment-5453606756
@Croway @davsclaus Implemented your feedback. Here is the final scope:
**What changed:**
`TypeConversionException.createMessage()` no longer concatenates the value.
The `"with value ..."` phrase is removed entirely from the message. The value
remains accessible via `getValue()`. New message format:
```
Error during type conversion from type: java.lang.String to the required
type: java.lang.Integer due to java.lang.NumberFormatException: ...
```
**What was removed:**
- `MessageSupport` size guard and all related helpers/configuration — per
Croway's review
- `MessageSupportOversizedBodyTest` — no longer relevant
- `safeValueDescription` helper — not needed with value omitted entirely
**Regression test added to `TypeConversionExceptionMessageTest`:**
```java
Object body = new Object() {
@Override
public String toString() {
throw new AssertionError("must not be called");
}
};
TypeConversionException exception =
new TypeConversionException(body, String.class, new
RuntimeException("cause"));
assertThat(exception.getValue()).isSameAs(body);
assertThat(exception.getMessage())
.contains(body.getClass().getName())
.contains("cause")
.doesNotContain("with value");
```
Full test suites for `camel-api`, `camel-support`, `camel-core` pass locally
with JDK 21.
_Claude Code on behalf of mayurbm_
--
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]