Skip to content

Commit 1a5df7d

Browse files
committed
change log and protocol test added
1 parent d54243b commit 1a5df7d

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "bugfix",
3+
"category": "AWS SDK for Java v2",
4+
"contributor": "",
5+
"description": "Updated codegen to add the null check and pass it in instead of throw NPE when serializing enum to string"
6+
}

test/protocol-tests-core/src/main/resources/software/amazon/awssdk/protocol/suites/cases/json-core-input.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,5 +640,28 @@
640640
}
641641
}
642642
}
643+
},
644+
{
645+
"description": "List of enums with null values are marshalled correctly without NPE",
646+
"given": {
647+
"input": {
648+
"ListOfEnums": [
649+
"EnumValue1",
650+
null,
651+
"EnumValue2"
652+
]
653+
}
654+
},
655+
"when": {
656+
"action": "marshall",
657+
"operation": "AllTypes"
658+
},
659+
"then": {
660+
"serializedAs": {
661+
"body": {
662+
"jsonEquals": "{\"ListOfEnums\": [\"EnumValue1\", null, \"EnumValue2\"]}"
663+
}
664+
}
665+
}
643666
}
644667
]

0 commit comments

Comments
 (0)