Skip to content

Remove url apis #759

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 14, 2025
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