Skip to content

Commit 5e544db

Browse files
committed
Rename InputSourceReference->ContentReference
1 parent 7b531ed commit 5e544db

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/main/java/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ public FromXmlParser(IOContext ctxt, int genericParserFeatures, int xmlFeatures,
235235
_ioContext = ctxt;
236236
_objectCodec = codec;
237237
_parsingContext = XmlReadContext.createRootContext(-1, -1);
238-
_xmlTokens = new XmlTokenStream(xmlReader, ctxt.sourceReference(),
238+
_xmlTokens = new XmlTokenStream(xmlReader, ctxt.contentReference(),
239239
_formatFeatures);
240240

241241
final int firstToken;
@@ -1323,7 +1323,7 @@ protected void _handleEOF() throws JsonParseException
13231323
_reportInvalidEOF(String.format(
13241324
": expected close marker for %s (start marker at %s)",
13251325
marker,
1326-
_parsingContext.startLocation(_ioContext.sourceReference())),
1326+
_parsingContext.startLocation(_ioContext.contentReference())),
13271327
null);
13281328
}
13291329
}

src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlReadContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

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

99
/**
1010
* Extension of {@link JsonStreamContext}, which implements
@@ -148,7 +148,7 @@ public final XmlReadContext createChildObjectContext(int lineNr, int colNr)
148148
* start marker was found
149149
*/
150150
@Override
151-
public final JsonLocation startLocation(InputSourceReference srcRef) {
151+
public final JsonLocation startLocation(ContentReference srcRef) {
152152
// We don't keep track of offsets at this level (only reader does)
153153
long totalChars = -1L;
154154

src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlTokenStream.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import org.codehaus.stax2.ri.Stax2ReaderAdapter;
1111

1212
import com.fasterxml.jackson.core.JsonLocation;
13-
import com.fasterxml.jackson.core.io.InputSourceReference;
13+
import com.fasterxml.jackson.core.io.ContentReference;
1414

1515
/**
1616
* Simple helper class used on top of STAX {@link XMLStreamReader} to further
@@ -62,7 +62,7 @@ public class XmlTokenStream
6262
protected final XMLStreamReader2 _xmlReader;
6363

6464
// @since 2.13 (was untyped before)
65-
protected final InputSourceReference _sourceReference;
65+
protected final ContentReference _sourceReference;
6666

6767
/**
6868
* Bit flag composed of bits that indicate which
@@ -150,7 +150,7 @@ public class XmlTokenStream
150150
/**********************************************************************
151151
*/
152152

153-
public XmlTokenStream(XMLStreamReader xmlReader, InputSourceReference sourceRef,
153+
public XmlTokenStream(XMLStreamReader xmlReader, ContentReference sourceRef,
154154
int formatFeatures)
155155
{
156156
_sourceReference = sourceRef;

src/test/java/com/fasterxml/jackson/dataformat/xml/stream/XmlTokenStreamTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import javax.xml.stream.*;
66

7-
import com.fasterxml.jackson.core.io.InputSourceReference;
7+
import com.fasterxml.jackson.core.io.ContentReference;
88
import com.fasterxml.jackson.dataformat.xml.XmlTestBase;
99
import com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser;
1010
import com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream;
@@ -176,7 +176,7 @@ private XmlTokenStream _tokensFor(String doc, int flags) throws Exception
176176
XMLStreamReader sr = _staxInputFactory.createXMLStreamReader(new StringReader(doc));
177177
// must point to START_ELEMENT, so:
178178
sr.nextTag();
179-
XmlTokenStream stream = new XmlTokenStream(sr, InputSourceReference.rawSource(doc), flags);
179+
XmlTokenStream stream = new XmlTokenStream(sr, ContentReference.rawReference(doc), flags);
180180
stream.initialize();
181181
return stream;
182182
}

0 commit comments

Comments
 (0)