Skip to content

Commit

Permalink
Rename InputSourceReference to ContentReference
Browse files Browse the repository at this point in the history
  • Loading branch information
yawkat committed Mar 30, 2021
1 parent f0b9b60 commit 7d8944a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.fasterxml.jackson.core.JsonLocation;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.exc.StreamReadException;
import com.fasterxml.jackson.core.io.InputSourceReference;
import com.fasterxml.jackson.core.io.ContentReference;

public class JacksonTomlParseException extends StreamReadException {
private JacksonTomlParseException(JsonParser p, String msg, JsonLocation loc) {
Expand All @@ -15,11 +15,11 @@ private JacksonTomlParseException(String msg, JsonLocation loc, Throwable rootCa
}

static class ErrorContext {
private final InputSourceReference inputSourceReference;
private final ContentReference ContentReference;
private final JsonParser parser;

ErrorContext(InputSourceReference inputSourceReference, JsonParser parser) {
this.inputSourceReference = inputSourceReference;
ErrorContext(ContentReference ContentReference, JsonParser parser) {
this.ContentReference = ContentReference;
this.parser = parser;
}

Expand All @@ -32,7 +32,7 @@ class ErrorBuilder {

private ErrorBuilder(Lexer lexer) {
this.location = new JsonLocation(
inputSourceReference,
ContentReference,
-1,
lexer.getCharPos(),
lexer.getLine() + 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ protected Writer _createWriter(IOContext ioCtxt, OutputStream out, JsonEncoding
*/

private ObjectNode parse(ObjectReadContext readCtxt, IOContext ctxt, Reader r0) {
JacksonTomlParseException.ErrorContext errorContext = new JacksonTomlParseException.ErrorContext(ctxt.sourceReference(), null);
JacksonTomlParseException.ErrorContext errorContext = new JacksonTomlParseException.ErrorContext(ctxt.contentReference(), null);
int readFeatures = readCtxt.getFormatReadFeatures(DEFAULT_TOML_PARSER_FEATURE_FLAGS);
try {
if (ctxt.isResourceManaged() || isEnabled(StreamReadFeature.AUTO_CLOSE_SOURCE)) {
Expand Down

0 comments on commit 7d8944a

Please sign in to comment.