Skip to content

Commit 307bea6

Browse files
committed
Renaming of InputSourceReference->ContentReference
1 parent 1d807c3 commit 307bea6

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/main/java/com/fasterxml/jackson/databind/deser/std/JsonLocationInstantiator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.fasterxml.jackson.databind.deser.std;
22

33
import com.fasterxml.jackson.core.JsonLocation;
4-
import com.fasterxml.jackson.core.io.InputSourceReference;
4+
import com.fasterxml.jackson.core.io.ContentReference;
55
import com.fasterxml.jackson.databind.DeserializationConfig;
66
import com.fasterxml.jackson.databind.DeserializationContext;
77
import com.fasterxml.jackson.databind.JavaType;
@@ -53,7 +53,7 @@ public Object createFromObjectWith(DeserializationContext ctxt, Object[] args) {
5353
// 14-Mar-2021, tatu: Before 2.13 constructor directly took "raw" source ref;
5454
// with 2.13 changed to use `InputSourceReference`... left almost as is,
5555
// for compatibility.
56-
final InputSourceReference srcRef = InputSourceReference.rawSource(args[0]);
56+
final ContentReference srcRef = ContentReference.rawReference(args[0]);
5757
return new JsonLocation(srcRef, _long(args[1]), _long(args[2]),
5858
_int(args[3]), _int(args[4]));
5959
}

src/main/java/com/fasterxml/jackson/databind/util/TokenBufferReadContext.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.fasterxml.jackson.databind.util;
22

33
import com.fasterxml.jackson.core.*;
4-
import com.fasterxml.jackson.core.io.InputSourceReference;
4+
import com.fasterxml.jackson.core.io.ContentReference;
55
import com.fasterxml.jackson.core.json.JsonReadContext;
66

77
/**
@@ -34,7 +34,7 @@ public class TokenBufferReadContext extends JsonStreamContext
3434
/**
3535
* @since 2.13
3636
*/
37-
protected TokenBufferReadContext(JsonStreamContext base, InputSourceReference srcRef)
37+
protected TokenBufferReadContext(JsonStreamContext base, ContentReference srcRef)
3838
{
3939
super(base);
4040
_parent = base.getParent();
@@ -50,9 +50,9 @@ protected TokenBufferReadContext(JsonStreamContext base, InputSourceReference sr
5050

5151
@Deprecated // @since 2.13
5252
protected TokenBufferReadContext(JsonStreamContext base, Object srcRef) {
53-
this(base, (srcRef instanceof InputSourceReference) ?
54-
(InputSourceReference) srcRef :
55-
InputSourceReference.rawSource(srcRef));
53+
this(base, (srcRef instanceof ContentReference) ?
54+
(ContentReference) srcRef :
55+
ContentReference.rawReference(srcRef));
5656
}
5757

5858
protected TokenBufferReadContext(JsonStreamContext base, JsonLocation startLoc) {
@@ -100,7 +100,7 @@ public static TokenBufferReadContext createRootContext(JsonStreamContext origCon
100100
if (origContext == null) {
101101
return new TokenBufferReadContext();
102102
}
103-
return new TokenBufferReadContext(origContext, InputSourceReference.unknown());
103+
return new TokenBufferReadContext(origContext, ContentReference.unknown());
104104
}
105105

106106
public TokenBufferReadContext createChildArrayContext() {

src/test/java/com/fasterxml/jackson/databind/deser/TestJacksonTypes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import java.util.*;
44

55
import com.fasterxml.jackson.core.*;
6-
import com.fasterxml.jackson.core.io.InputSourceReference;
6+
import com.fasterxml.jackson.core.io.ContentReference;
77
import com.fasterxml.jackson.databind.*;
88
import com.fasterxml.jackson.databind.type.TypeFactory;
99
import com.fasterxml.jackson.databind.util.TokenBuffer;
@@ -19,7 +19,7 @@ public class TestJacksonTypes
1919
public void testJsonLocation() throws Exception
2020
{
2121
// note: source reference is untyped, only String guaranteed to work
22-
JsonLocation loc = new JsonLocation(InputSourceReference.rawSource("whatever"),
22+
JsonLocation loc = new JsonLocation(ContentReference.rawReference("whatever"),
2323
-1, -1, 100, 13);
2424
// Let's use serializer here; goal is round-tripping
2525
String ser = MAPPER.writerWithDefaultPrettyPrinter()

src/test/java/com/fasterxml/jackson/databind/ser/TestJacksonTypes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import java.util.*;
55

66
import com.fasterxml.jackson.core.*;
7-
import com.fasterxml.jackson.core.io.InputSourceReference;
7+
import com.fasterxml.jackson.core.io.ContentReference;
88

99
import com.fasterxml.jackson.databind.*;
1010
import com.fasterxml.jackson.databind.util.TokenBuffer;
@@ -18,7 +18,7 @@ public class TestJacksonTypes
1818
public void testLocation() throws IOException
1919
{
2020
File f = new File("/tmp/test.json");
21-
JsonLocation loc = new JsonLocation(InputSourceReference.rawSource(f),
21+
JsonLocation loc = new JsonLocation(ContentReference.rawReference(f),
2222
-1, 100, 13);
2323
ObjectMapper mapper = new ObjectMapper();
2424
Map<String,Object> result = writeAndMap(mapper, loc);

0 commit comments

Comments
 (0)