Skip to content

Commit

Permalink
revert deprecations as they break 2.11
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddenton committed May 27, 2019
1 parent 1c4c94c commit 35f2e22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 35f2e22

Please sign in to comment.