From 35f2e22837c90c5149fb7900416bdfffe6e361a3 Mon Sep 17 00:00:00 2001 From: David Denton Date: Mon, 27 May 2019 13:49:10 +0100 Subject: [PATCH] revert deprecations as they break 2.11 --- .../scala/io/fintrospect/parameters/MultipartFileTest.scala | 2 +- .../scala/io/fintrospect/templating/ScalaObjectHandler.scala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/test/scala/io/fintrospect/parameters/MultipartFileTest.scala b/core/src/test/scala/io/fintrospect/parameters/MultipartFileTest.scala index fd1a0df2..d58d760a 100644 --- a/core/src/test/scala/io/fintrospect/parameters/MultipartFileTest.scala +++ b/core/src/test/scala/io/fintrospect/parameters/MultipartFileTest.scala @@ -12,7 +12,7 @@ class MultipartFileTest extends FunSpec with Matchers { describe("OnDiskMultiPartFile") { it("converts toFileElement") { val tempFile = File.createTempFile("temp", "file") - Files.asCharSink(tempFile, UTF_8).write("hello bob") + Files.write("hello bob", tempFile, UTF_8) tempFile.deleteOnExit() Bufs.asUtf8String(OnDiskMultiPartFile("file", tempFile, None).toFileElement("hello").content) shouldBe "hello bob" } diff --git a/mustache/src/main/scala/io/fintrospect/templating/ScalaObjectHandler.scala b/mustache/src/main/scala/io/fintrospect/templating/ScalaObjectHandler.scala index eb56b24d..7928dd09 100644 --- a/mustache/src/main/scala/io/fintrospect/templating/ScalaObjectHandler.scala +++ b/mustache/src/main/scala/io/fintrospect/templating/ScalaObjectHandler.scala @@ -6,7 +6,7 @@ import java.lang.reflect.{Field, Method} import com.github.mustachejava.Iteration import com.github.mustachejava.reflect.ReflectionObjectHandler -import scala.collection.JavaConverters +import scala.collection.JavaConversions.mapAsJavaMap import scala.reflect.ClassTag import scala.runtime.BoxedUnit @@ -17,7 +17,7 @@ class ScalaObjectHandler extends ReflectionObjectHandler { override def checkField(member: Field) {} override def coerce(value: AnyRef) = value match { - case m: collection.Map[_, _] => JavaConverters.mapAsJavaMap(m) + case m: collection.Map[_, _] => mapAsJavaMap(m) case _: BoxedUnit => null case Some(some: AnyRef) => coerce(some) case None => null