File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
src/main/java/com/fasterxml/jackson/dataformat/xml Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -935,10 +935,15 @@ public Number getNumberValue() throws IOException {
935
935
protected void _handleEOF () throws JsonParseException
936
936
{
937
937
if (!_parsingContext .inRoot ()) {
938
- _reportInvalidEOF (": expected close marker for " +_parsingContext .getTypeDesc ()+" (from " +_parsingContext .getStartLocation (_ioContext .getSourceReference ())+")" );
938
+ String marker = _parsingContext .inArray () ? "Array" : "Object" ;
939
+ _reportInvalidEOF (String .format (
940
+ ": expected close marker for %s (start marker at %s)" ,
941
+ marker ,
942
+ _parsingContext .getStartLocation (_ioContext .getSourceReference ())),
943
+ null );
939
944
}
940
945
}
941
-
946
+
942
947
/*
943
948
/**********************************************************
944
949
/* Internal methods
Original file line number Diff line number Diff line change @@ -468,7 +468,7 @@ public final void writeStartArray() throws IOException
468
468
public final void writeEndArray () throws IOException
469
469
{
470
470
if (!_writeContext .inArray ()) {
471
- _reportError ("Current context not an ARRAY but " +_writeContext .getTypeDesc ());
471
+ _reportError ("Current context not Array but " +_writeContext .typeDesc ());
472
472
}
473
473
if (_cfgPrettyPrinter != null ) {
474
474
_cfgPrettyPrinter .writeEndArray (this , _writeContext .getEntryCount ());
@@ -494,7 +494,7 @@ public final void writeStartObject() throws IOException
494
494
public final void writeEndObject () throws IOException
495
495
{
496
496
if (!_writeContext .inObject ()) {
497
- _reportError ("Current context not an object but " +_writeContext .getTypeDesc ());
497
+ _reportError ("Current context not Object but " +_writeContext .typeDesc ());
498
498
}
499
499
_writeContext = _writeContext .getParent ();
500
500
if (_cfgPrettyPrinter != null ) {
You can’t perform that action at this time.
0 commit comments