Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into salat_2.10
Browse files Browse the repository at this point in the history
Conflicts:
	project/SalatBuild.scala
  • Loading branch information
rktoomey committed Feb 15, 2013
1 parent fbcfec6 commit 7d64e50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions salat-core/src/main/scala/com/novus/salat/Context.scala
Expand Up @@ -51,7 +51,7 @@ trait Context extends ContextLifecycle with Logging {
/**Per class key overrides - map key is (clazz.getName, field name) */
private[salat] val perClassKeyOverrides: scala.collection.concurrent.Map[(String, String), String] = scala.collection.convert.Wrappers.JConcurrentMapWrapper(new ConcurrentHashMap[(String, String), String]())

private[salat] val customTransformers: ConcurrentMap[String, CustomTransformer[_ <: AnyRef, _ <: AnyRef]] = JConcurrentMapWrapper(new ConcurrentHashMap[String, CustomTransformer[_ <: AnyRef, _ <: AnyRef]]())
private[salat] val customTransformers: scala.collection.concurrent.Map[String, CustomTransformer[_ <: AnyRef, _ <: AnyRef]] = scala.collection.convert.Wrappers.JConcurrentMapWrapper(new ConcurrentHashMap[String, CustomTransformer[_ <: AnyRef, _ <: AnyRef]]())

val typeHintStrategy: TypeHintStrategy = StringTypeHintStrategy(when = TypeHintFrequency.WhenNecessary, typeHint = TypeHint)

Expand Down Expand Up @@ -105,7 +105,7 @@ trait Context extends ContextLifecycle with Logging {
sys.error("Context '%s' already contains a custom transformer for class='%s'!".format(name, custom.path))
}
customTransformers += custom.path -> custom
log.debug("registerCustomTransformer: %s <-> %s", manifest[A].erasure.getName, manifest[B].erasure.getName)
log.debug("registerCustomTransformer: %s <-> %s", manifest[A].runtimeClass.getName, manifest[B].runtimeClass.getName)
}

def determineFieldName(clazz: Class[_], field: SField): String = determineFieldName(clazz, field.name)
Expand Down
Expand Up @@ -11,11 +11,11 @@ abstract class CustomTransformer[ModelObject <: AnyRef: Manifest, SerializedRepr
case i: ModelObject => Option(serialize(i))
}

def path = manifest[ModelObject].erasure.getName
def path = manifest[ModelObject].runtimeClass.getName

def deserialize(b: SerializedRepr): ModelObject

def serialize(a: ModelObject): SerializedRepr

override def toString = "CustomTransformer[ %s <-> %s ]".format(manifest[ModelObject].erasure.getName, manifest[SerializedRepr].erasure.getName)
override def toString = "CustomTransformer[ %s <-> %s ]".format(manifest[ModelObject].runtimeClass.getName, manifest[SerializedRepr].runtimeClass.getName)
}

0 comments on commit 7d64e50

Please sign in to comment.