From 95a16436a43ae474ca06aa1011081e3f3fc62ee9 Mon Sep 17 00:00:00 2001 From: Tomoyuki MORITA Date: Thu, 14 Nov 2024 10:01:44 -0800 Subject: [PATCH] Fix coverage issue for #3063 (#3155) Signed-off-by: Tomoyuki Morita --- .../sql/protocol/response/format/FlatResponseBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/src/main/java/org/opensearch/sql/protocol/response/format/FlatResponseBase.java b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/FlatResponseBase.java index be2517bf6c..ee6e2051d2 100644 --- a/protocol/src/main/java/org/opensearch/sql/protocol/response/format/FlatResponseBase.java +++ b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/FlatResponseBase.java @@ -84,7 +84,7 @@ protected List> formatData(List> lines) { protected String quoteIfRequired(String separator, String cell) { final String quote = "\""; - if (cell != null && (cell.contains(separator) || cell.contains(quote))) { + if (cell.contains(separator) || cell.contains(quote)) { return quote + cell.replaceAll(quote, quote + quote) + quote; } else { return cell;