Skip to content

Commit 64bcd96

Browse files
committed
Update
Signed-off-by: Peng Huo <penghuo@gmail.com>
1 parent 454bf83 commit 64bcd96

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

core/src/main/java/org/opensearch/sql/utils/YamlFormatter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class YamlFormatter {
2323
static {
2424
YAMLFactory yamlFactory = new YAMLFactory();
2525
yamlFactory.disable(YAMLGenerator.Feature.WRITE_DOC_START_MARKER);
26-
yamlFactory.disable(YAMLGenerator.Feature.USE_PLATFORM_LINE_BREAKS);
26+
yamlFactory.enable(YAMLGenerator.Feature.USE_PLATFORM_LINE_BREAKS);
2727
yamlFactory.enable(YAMLGenerator.Feature.LITERAL_BLOCK_STYLE);
2828
yamlFactory.enable(YAMLGenerator.Feature.MINIMIZE_QUOTES); // Enable smart quoting
2929
yamlFactory.enable(

protocol/src/main/java/org/opensearch/sql/protocol/response/format/YamlResponseFormatter.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ public String format(R response) {
2727

2828
@Override
2929
public String format(Throwable t) {
30-
return AccessController.doPrivileged(
31-
(PrivilegedAction<String>) () -> YamlFormatter.formatToYaml(t));
30+
return yamlify(t);
3231
}
3332

3433
public String contentType() {

0 commit comments

Comments
 (0)