Skip to content

Commit 24b6618

Browse files
committed
Update CaseClassDeserializerTest.scala
1 parent 0210aaa commit 24b6618

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/scala/tools/jackson/module/scala/deser/CaseClassDeserializerTest.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,12 @@ class CaseClassDeserializerTest extends DeserializerTest {
222222
result.list shouldBe None
223223
}
224224

225+
it should "support deserializing empty input for Option[List] as Some(List.empty)" in {
226+
val input = """{"list":[]}"""
227+
val result = deserialize(input, classOf[OptionListHolder[String]])
228+
result.list shouldBe Some(List.empty)
229+
}
230+
225231
it should "support deserializing null input for map as empty map" in {
226232
val input = """{}"""
227233
val result = deserialize(input, classOf[MapHolder[Int, String]])

0 commit comments

Comments
 (0)