Skip to content

Commit

Permalink
Fix the build error when doing a full cross SBT build including Scala…
Browse files Browse the repository at this point in the history
… 2.12.
  • Loading branch information
sageserpent-open committed Sep 26, 2024
1 parent da6f5ae commit 98873f8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ object ScalaObjectSerializerTest
class ScalaObjectSerializerTest extends AbstractKryoTest {
private def configureKryo(): Unit = {
kryo.setRegistrationRequired(false)
kryo.addDefaultSerializer(classOf[standalone.type], classOf[ScalaObjectSerializer[Any]])
kryo.addDefaultSerializer(classOf[ScalaObjectSerializerTest.type], classOf[ScalaObjectSerializer[Any]])
// NOTE: to support building under Scala 2.12, use the Java approach of obtaining
// a singleton object's class at runtime, rather than `classOf[singleton.type]`
kryo.addDefaultSerializer(standalone.getClass, classOf[ScalaObjectSerializer[Any]])
kryo.addDefaultSerializer(ScalaObjectSerializerTest.getClass, classOf[ScalaObjectSerializer[Any]])
}

behavior of "ScalaObjectSerializer"
Expand Down

0 comments on commit 98873f8

Please sign in to comment.