Skip to content

Commit e98a273

Browse files
committed
Merge branch '2.7'
2 parents 4b95df1 + 8daddc0 commit e98a273

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

release-notes/VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Project: jackson-databind
6060
(reported by Mark W)
6161
#1248: `Annotated` returns raw type in place of Generic Type in 2.7.x
6262
(reported by Andrew J, apjoseph@github)
63+
#1253: Problem with context handling for `TokenBuffer`, field name
6364

6465
2.7.4 (29-Apr-2016)
6566

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ public void close() throws IOException {
623623
@Override
624624
public final void writeStartArray() throws IOException
625625
{
626+
_writeContext.writeValue();
626627
_append(JsonToken.START_ARRAY);
627628
_writeContext = _writeContext.createChildArrayContext();
628629
}
@@ -641,6 +642,7 @@ public final void writeEndArray() throws IOException
641642
@Override
642643
public final void writeStartObject() throws IOException
643644
{
645+
_writeContext.writeValue();
644646
_append(JsonToken.START_OBJECT);
645647
_writeContext = _writeContext.createChildObjectContext();
646648
}
@@ -670,15 +672,15 @@ public final void writeEndObject() throws IOException
670672
@Override
671673
public final void writeFieldName(String name) throws IOException
672674
{
673-
_append(JsonToken.FIELD_NAME, name);
674675
_writeContext.writeFieldName(name);
676+
_append(JsonToken.FIELD_NAME, name);
675677
}
676678

677679
@Override
678680
public void writeFieldName(SerializableString name) throws IOException
679681
{
680-
_append(JsonToken.FIELD_NAME, name);
681682
_writeContext.writeFieldName(name.getValue());
683+
_append(JsonToken.FIELD_NAME, name);
682684
}
683685

684686
/*

0 commit comments

Comments
 (0)