Skip to content

Commit 0cda81d

Browse files
committed
...
1 parent 473f7a8 commit 0cda81d

3 files changed

Lines changed: 1329 additions & 1 deletion

File tree

yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/YAMLParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ public JsonToken nextToken() throws IOException
619619
if (evt.is(Event.ID.StreamEnd)) { // end-of-input; force closure
620620
// [dataformats-text#154]: If we have no content and feature is enabled,
621621
// emit a synthetic empty object instead of null
622-
if (!_hasContent && (_formatFeatures & Feature.EMPTY_DOCUMENT_AS_EMPTY_OBJECT.getMask()) != 0) {
622+
if (!_hasContent && Feature.EMPTY_DOCUMENT_AS_EMPTY_OBJECT.enabledIn(_formatFeatures)) {
623623
_emittingSyntheticEmptyObject = true;
624624
// Don't close yet - we need to emit END_OBJECT first
625625
createChildObjectContext(0, 0);

0 commit comments

Comments
 (0)