Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@ object VPackScalaDeserializers {
}
}

val LIST = new VPackDeserializer[List[Any]] {
val LIST = new VPackDeserializerParameterizedType[List[Any]] {
def deserialize(parent: VPackSlice, vpack: VPackSlice, context: VPackDeserializationContext): List[Any] =
context.deserialize(vpack, classOf[java.util.List[Any]]).toList
throw new UnsupportedOperationException

def deserialize(parent: VPackSlice, vpack: VPackSlice, context: VPackDeserializationContext, t: ParameterizedType): List[Any] = {
val clazz = t.getActualTypeArguments()(0).asInstanceOf[Class[Any]]
vpack.arrayIterator().map { slice => context.deserialize(slice, clazz) }.toList
}
}

val MAP = new VPackDeserializer[Map[Any, Any]] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class VPackListTest extends FunSuite with Matchers {
entity.i(0) should be(69)
entity.o.size should be(1)
entity.o(0) should not be null
entity.o(0) shouldBe a [ListTestEntity]
}

}
}