Skip to content

Commit 8eef1f8

Browse files
authored
Remove url apis (#759)
* remove methods that take URL inputs * Update ClassTagExtensionsTest.scala
1 parent fe03376 commit 8eef1f8

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

src/main/scala/tools/jackson/module/scala/ClassTagExtensions.scala

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import tools.jackson.databind.`type`.{MapLikeType, TypeFactory}
66
import tools.jackson.databind.json.JsonMapper
77

88
import java.io.{File, InputStream, Reader}
9-
import java.net.URL
109
import scala.collection.immutable.IntMap
1110
import scala.collection.{immutable, mutable}
1211
import scala.reflect.ClassTag
@@ -112,10 +111,6 @@ trait ClassTagExtensions {
112111
readValue(src, constructType[T])
113112
}
114113

115-
def readValue[T: JavaTypeable](src: URL): T = {
116-
readValue(src, constructType[T])
117-
}
118-
119114
def readValue[T: JavaTypeable](content: String): T = {
120115
readValue(content, constructType[T])
121116
}
@@ -140,10 +135,6 @@ trait ClassTagExtensions {
140135
objectReaderFor(valueToUpdate).readValue(src)
141136
}
142137

143-
def updateValue[T: JavaTypeable](valueToUpdate: T, src: URL): T = {
144-
objectReaderFor(valueToUpdate).readValue(src)
145-
}
146-
147138
def updateValue[T: JavaTypeable](valueToUpdate: T, content: String): T = {
148139
objectReaderFor(valueToUpdate).readValue(content)
149140
}

src/test/scala/tools/jackson/module/scala/ClassTagExtensionsTest.scala

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,6 @@ class ClassTagExtensionsTest extends JacksonTest {
9797
}
9898
}
9999

100-
it should "read value from URL" in {
101-
withFile(genericJson) { file =>
102-
val result = mapper.readValue[GenericTestClass[Int]](file.toURI.toURL)
103-
result should equal(genericInt)
104-
}
105-
}
106-
107100
it should "read value from string" in {
108101
val result = mapper.readValue[GenericTestClass[Int]](genericJson)
109102
result should equal(genericInt)
@@ -234,13 +227,6 @@ class ClassTagExtensionsTest extends JacksonTest {
234227
}
235228
}
236229

237-
it should "update value from URL" in {
238-
withFile(toplevelArrayJson) { file =>
239-
val result = mapper.updateValue(List.empty[GenericTestClass[Int]], file.toURI.toURL)
240-
result should equal(listGenericInt)
241-
}
242-
}
243-
244230
it should "update value from string" in {
245231
val result = mapper.updateValue(List.empty[GenericTestClass[Int]], toplevelArrayJson)
246232
result should equal(listGenericInt)

0 commit comments

Comments
 (0)