Skip to content

Commit 9cd7ba4

Browse files
committed
Separated the registration of JavaIterableWrapperSerializer into a new class.
1 parent 4cacc0c commit 9cd7ba4

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

chill-scala/src/main/scala/com/twitter/chill/ScalaKryoInstantiator.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ class ScalaCollectionsRegistrar extends IKryoRegistrar {
160160
.forTraversableSubclass(MMap.empty[Any, Any], isImmutable = false)
161161
.forTraversableSubclass(MSet.empty[Any], isImmutable = false)
162162
.forTraversableSubclass(ListBuffer.empty[Any], isImmutable = false)
163+
}
164+
}
163165

166+
class JavaWrapperCollectionRegistrar extends IKryoRegistrar {
167+
def apply(newK: Kryo) {
164168
newK.register(JavaIterableWrapperSerializer.wrapperClass, new JavaIterableWrapperSerializer)
165169
}
166170
}
@@ -170,6 +174,10 @@ class AllScalaRegistrar extends IKryoRegistrar {
170174
def apply(k: Kryo) {
171175
val col = new ScalaCollectionsRegistrar
172176
col(k)
177+
178+
val jcol = new JavaWrapperCollectionRegistrar
179+
jcol(k)
180+
173181
// Register all 22 tuple serializers and specialized serializers
174182
ScalaTupleSerialization.register(k)
175183
k.forClass[Symbol](new KSerializer[Symbol] {

0 commit comments

Comments
 (0)