Skip to content

Commit ea2a84f

Browse files
committed
chore: add @nowarn for ScalaTestEventMigration
1 parent ac5713b commit ea2a84f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

akka-serialization-jackson/src/test/scala/akka/serialization/jackson/ScalaTestEventMigration.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import com.fasterxml.jackson.databind.JsonNode
88
import com.fasterxml.jackson.databind.node.IntNode
99
import com.fasterxml.jackson.databind.node.ObjectNode
1010

11+
import scala.annotation.nowarn
12+
1113
object ScalaTestEventMigration {
1214
def upcastV1ToV2(root: ObjectNode): ObjectNode = {
1315
root.set[JsonNode]("field1V2", root.get("field1"))
@@ -17,15 +19,15 @@ object ScalaTestEventMigration {
1719
}
1820

1921
def upcastV2ToV3(root: ObjectNode): ObjectNode = {
20-
root.set("field3", root.get("field2"))
22+
root.set("field3", root.get("field2")): @nowarn
2123
root.remove("field2")
2224
root
2325
}
2426

2527
def downcastV3ToV2(root: ObjectNode) = {
2628
// downcast the V3 representation to the V2 representation. A field
2729
// is renamed.
28-
root.set("field2", root.get("field3"))
30+
root.set("field2", root.get("field3")): @nowarn
2931
root.remove("field3")
3032
root
3133
}

0 commit comments

Comments
 (0)