From 8d58f92053c9ea8d00bc7ae597e01a535638ed11 Mon Sep 17 00:00:00 2001 From: BenWhitehead Date: Wed, 15 Oct 2014 20:37:58 -0700 Subject: [PATCH] Update from manifest.erasure to manifest.runtimeClass to get rid of deprication warning. --- .../scala/io/github/benwhitehead/finch/JacksonWrapper.scala | 4 ++-- .../scala/io/github/benwhitehead/finch/TestingServer.scala | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/scala/io/github/benwhitehead/finch/JacksonWrapper.scala b/src/main/scala/io/github/benwhitehead/finch/JacksonWrapper.scala index 449d0eb..8d07af0 100644 --- a/src/main/scala/io/github/benwhitehead/finch/JacksonWrapper.scala +++ b/src/main/scala/io/github/benwhitehead/finch/JacksonWrapper.scala @@ -50,9 +50,9 @@ object JacksonWrapper { } private [this] def typeFromManifest(m: Manifest[_]): Type = { - if (m.typeArguments.isEmpty) { m.erasure } + if (m.typeArguments.isEmpty) { m.runtimeClass } else new ParameterizedType { - def getRawType = m.erasure + def getRawType = { m.runtimeClass } def getActualTypeArguments = m.typeArguments.map(typeFromManifest).toArray def getOwnerType = null } diff --git a/src/test/scala/io/github/benwhitehead/finch/TestingServer.scala b/src/test/scala/io/github/benwhitehead/finch/TestingServer.scala index 224abd4..9d23a73 100644 --- a/src/test/scala/io/github/benwhitehead/finch/TestingServer.scala +++ b/src/test/scala/io/github/benwhitehead/finch/TestingServer.scala @@ -6,7 +6,7 @@ import com.twitter.finagle.http.path.{->, /, Root} import com.twitter.util.Future import io.finch._ import io.finch.response._ -import io.github.benwhitehead.finch.request.{RequiredStringBody, RequiredBody, DelegateService} +import io.github.benwhitehead.finch.request.{RequiredStringBody, DelegateService} /** * @author Ben Whitehead