gnodet-bot commented on PR #26757:
URL: https://github.com/apache/camel/pull/26757#issuecomment-5790100118
**[Re-raise] Missing test: null-valued map entry** — still not added after
this push.
The `containsKey`/`get` path in `mapValue()` correctly uses `NO_SUCH_KEY` to
distinguish "key absent" from "key present with null value", but this
distinction is untested. Please add after `testOgnlDotOnANestedMapReadsTheKey`:
```java
@Test
public void testOgnlDotOnAMapWithNullValueReturnsNull() {
java.util.HashMap<String, Object> m = new java.util.HashMap<>();
m.put("sku", null);
exchange.getIn().setBody(m);
assertNull(context.resolveLanguage("simple").createExpression("${body.sku}").evaluate(exchange,
Object.class),
"a null value is a valid map entry; the expression must return
null, not throw");
}
```
_This review was generated by an AI agent, Hermès on behalf of @gnodet._
<!-- reviewer: gnodet-bot -->
--
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]