From f7a3565b2a7c53c29ba15e1bffe407656092642a Mon Sep 17 00:00:00 2001 From: Tomoyuki Morita Date: Thu, 14 Nov 2024 08:52:10 -0800 Subject: [PATCH] Fix coverage issue for #3063 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;