@@ -8,6 +8,7 @@ import scala.reflect.ClassTag
88import akka .actor .ExtendedActorSystem
99import akka .event .Logging
1010import akka .serialization .SerializerWithStringManifest
11+
1112import io .circe ._
1213import io .circe .jawn .JawnParser
1314
@@ -98,19 +99,17 @@ abstract class CirceAkkaSerializer[Ser <: AnyRef: ClassTag](system: ExtendedActo
9899 /**
99100 * The intended usage of this method is to provide any form of support for generic classes.
100101 *
101- * Because of type erasure, it's impossible to [[org.virtuslab.ash.circe.Register ]] one generic class two times with
102- * different type parameters.
102+ * Because of type erasure, it's impossible to [[org.virtuslab.ash.circe.Register ]] one generic class two times with different
103+ * type parameters.
103104 *
104- * The trick for combating type erasure is to register generic class only once with type parameter being its upper
105- * bound, and provide custom made [[io.circe.Codec ]] that can serialize/deserialize all classes that are used as a
106- * type parameter.
105+ * The trick for combating type erasure is to register generic class only once with type parameter being its upper bound, and
106+ * provide custom made [[io.circe.Codec ]] that can serialize/deserialize all classes that are used as a type parameter.
107107 *
108- * For example, if the upper bound is `Any`, but you know that only `Int` and `String` are used as a type parameter,
109- * then you can create a custom [[io.circe.Codec ]] for `Any` that handles `Int` and `String` and throws `Exception`
110- * otherwise.
108+ * For example, if the upper bound is `Any`, but you know that only `Int` and `String` are used as a type parameter, then you
109+ * can create a custom [[io.circe.Codec ]] for `Any` that handles `Int` and `String` and throws `Exception` otherwise.
111110 *
112- * To use this method correctly, set the upper bound for the type parameter of generic class to `Ser` and put the
113- * returned Codec as implicit in a place that can be seen by type derivation.
111+ * To use this method correctly, set the upper bound for the type parameter of generic class to `Ser` and put the returned
112+ * Codec as implicit in a place that can be seen by type derivation.
114113 *
115114 * Example of generic class:
116115 * {{{
@@ -129,12 +128,7 @@ abstract class CirceAkkaSerializer[Ser <: AnyRef: ClassTag](system: ExtendedActo
129128 private def logDuration (action : String , obj : AnyRef , startTime : Long , bytes : Array [Byte ]): Unit = {
130129 if (isDebugEnabled) {
131130 val durationMicros = (System .nanoTime - startTime) / 1000
132- log.debug(
133- " {} of [{}] took [{}] microsecond, size [{}] bytes" ,
134- action,
135- obj.getClass.getName,
136- durationMicros,
137- bytes.length)
131+ log.debug(" {} of [{}] took [{}] microsecond, size [{}] bytes" , action, obj.getClass.getName, durationMicros, bytes.length)
138132 }
139133 }
140134
0 commit comments