You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DynamoDbIgnoreNulls example assertions are incorrect #4459
The javadoc for DynamoDbIgnoreNulls shows two assertions at the end.
// innerBean1 w/ @DynamoDbIgnoreNulls does not have any attribute values because all the fields are null
assertThat(itemMap.get("innerBean1").m(), empty());
// innerBean2 w/o @DynamoDbIgnoreNulls has a NULLL attribute.
assertThat(nestedBean.getInnerBean2(), hasEntry("attribute", nullAttributeValue()));
Assuming that hamcrest matchers are being used, for example
I found that assertThat(itemMap.get("innerBean1").m(), empty()); does not compile. Matchers.empty() is used to check a Collection, but itemMap.get("innerBean1").m() returns a Map. A Map is not a Collection.
Hi @Ignacio-Trottaa, apologies for the late response. Are you still interested in contributing a fix for this? If so, feel free to submit a PR and we'll review it. Thanks!
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
Activity
Ignacio-Trottaa commentedon Dec 17, 2025
Hi! I'm interested in working on this issue. This would be one of my first contributions to the project.
I can see the Hamcrest matchers in the javadoc examples have some issues that prevent compilation. Could you please assign this to me?
thanks
bhoradc commentedon Mar 11, 2026
Hi @Ignacio-Trottaa, apologies for the late response. Are you still interested in contributing a fix for this? If so, feel free to submit a PR and we'll review it. Thanks!
CheHyeonYeong commentedon Mar 28, 2026
Hi, I'd like to work on this issue.
I noticed the assertion examples in the Javadoc are incorrect:
empty()matcher is for Collections, butitemMap.get("innerBean1").m()returns a MapnestedBean.getInnerBean2()returns null, sohasEntry()doesn't make sense hereI'll submit a PR to fix these examples with correct assertions.
github-actions commentedon Apr 3, 2026
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.