Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import tools.jackson.databind.`type`.{MapLikeType, TypeFactory}
import tools.jackson.databind.json.JsonMapper

import java.io.{File, InputStream, Reader}
import java.net.URL
import scala.collection.immutable.IntMap
import scala.collection.{immutable, mutable}
import scala.reflect.ClassTag
Expand Down Expand Up @@ -112,10 +111,6 @@ trait ClassTagExtensions {
readValue(src, constructType[T])
}

def readValue[T: JavaTypeable](src: URL): T = {
readValue(src, constructType[T])
}

def readValue[T: JavaTypeable](content: String): T = {
readValue(content, constructType[T])
}
Expand All @@ -140,10 +135,6 @@ trait ClassTagExtensions {
objectReaderFor(valueToUpdate).readValue(src)
}

def updateValue[T: JavaTypeable](valueToUpdate: T, src: URL): T = {
objectReaderFor(valueToUpdate).readValue(src)
}

def updateValue[T: JavaTypeable](valueToUpdate: T, content: String): T = {
objectReaderFor(valueToUpdate).readValue(content)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,6 @@ class ClassTagExtensionsTest extends JacksonTest {
}
}

it should "read value from URL" in {
withFile(genericJson) { file =>
val result = mapper.readValue[GenericTestClass[Int]](file.toURI.toURL)
result should equal(genericInt)
}
}

it should "read value from string" in {
val result = mapper.readValue[GenericTestClass[Int]](genericJson)
result should equal(genericInt)
Expand Down Expand Up @@ -234,13 +227,6 @@ class ClassTagExtensionsTest extends JacksonTest {
}
}

it should "update value from URL" in {
withFile(toplevelArrayJson) { file =>
val result = mapper.updateValue(List.empty[GenericTestClass[Int]], file.toURI.toURL)
result should equal(listGenericInt)
}
}

it should "update value from string" in {
val result = mapper.updateValue(List.empty[GenericTestClass[Int]], toplevelArrayJson)
result should equal(listGenericInt)
Expand Down