Skip to content

Commit e366c11

Browse files
committed
Change
1 parent dec8b68 commit e366c11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/x-content/src/main/java/org/elasticsearch/xcontent/support/MapXContentParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public XContentString optimizedText() throws IOException {
149149
return new Text(value.toString());
150150
}
151151
} else {
152-
throw new IllegalStateException("Cannot get text for the current token " + currentToken());
152+
return new Text(text());
153153
}
154154
}
155155

0 commit comments

Comments
 (0)