Skip to content

Commit a59a5b2

Browse files
Fix incorrect assertion examples in DynamoDbIgnoreNulls Javadoc (#6826)
* Fix incorrect assertion examples in DynamoDbIgnoreNulls Javadoc - Change empty() to anEmptyMap() for Map type checking - Fix nestedBean.getInnerBean2() to itemMap.get("innerBean2").m() - Fix typo: return innerBean -> return innerBean2 Signed-off-by: chehyeonyeong * Minor wording update --------- Signed-off-by: chehyeonyeong Co-authored-by: Alex Woods <alextwoods@outlook.com>
1 parent 59e7a25 commit a59a5b2

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/mapper/annotations

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/mapper/annotations/DynamoDbIgnoreNulls.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
* }
4646
*
4747
* public AbstractBean getInnerBean2() {
48-
* return innerBean;
48+
* return innerBean2;
4949
* }
5050
* public void setInnerBean2(AbstractBean innerBean) {
5151
* this.innerBean2 = innerBean;
@@ -62,11 +62,11 @@
6262
*
6363
* Map<String, AttributeValue> itemMap = beanTableSchema.itemToMap(bean, true);
6464
*
65-
* // innerBean1 w/ @DynamoDbIgnoreNulls does not have any attribute values because all the fields are null
66-
* assertThat(itemMap.get("innerBean1").m(), empty());
65+
* // innerBean1 with @DynamoDbIgnoreNulls does not have any attribute values because all the fields are null
66+
* assertThat(itemMap.get("innerBean1").m(), anEmptyMap());
6767
*
68-
* // innerBean2 w/o @DynamoDbIgnoreNulls has a NULL attribute.
69-
* assertThat(nestedBean.getInnerBean2(), hasEntry("attribute", nullAttributeValue()));
68+
* // innerBean2 without @DynamoDbIgnoreNulls has a NULL attribute.
69+
* assertThat(itemMap.get("innerBean2").m(), hasEntry("attribute", nullAttributeValue()));
7070
* }
7171
*/
7272
@SdkPublicApi

0 commit comments

Comments
 (0)