Skip to content

Commit 3673c06

Browse files
committed
warnings cleanup
1 parent 18bf45f commit 3673c06

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -935,10 +935,15 @@ public Number getNumberValue() throws IOException {
935935
protected void _handleEOF() throws JsonParseException
936936
{
937937
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);
939944
}
940945
}
941-
946+
942947
/*
943948
/**********************************************************
944949
/* Internal methods

src/main/java/com/fasterxml/jackson/dataformat/xml/ser/ToXmlGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ public final void writeStartArray() throws IOException
468468
public final void writeEndArray() throws IOException
469469
{
470470
if (!_writeContext.inArray()) {
471-
_reportError("Current context not an ARRAY but "+_writeContext.getTypeDesc());
471+
_reportError("Current context not Array but "+_writeContext.typeDesc());
472472
}
473473
if (_cfgPrettyPrinter != null) {
474474
_cfgPrettyPrinter.writeEndArray(this, _writeContext.getEntryCount());
@@ -494,7 +494,7 @@ public final void writeStartObject() throws IOException
494494
public final void writeEndObject() throws IOException
495495
{
496496
if (!_writeContext.inObject()) {
497-
_reportError("Current context not an object but "+_writeContext.getTypeDesc());
497+
_reportError("Current context not Object but "+_writeContext.typeDesc());
498498
}
499499
_writeContext = _writeContext.getParent();
500500
if (_cfgPrettyPrinter != null) {

0 commit comments

Comments
 (0)