Skip to content

Commit

Permalink
Replace Strings util package with OpenSearch core Strings package (#675)
Browse files Browse the repository at this point in the history
Signed-off-by: Naveen Tatikonda <navtat@amazon.com>
(cherry picked from commit d8fcdae)
  • Loading branch information
naveentatikonda authored and github-actions[bot] committed Aug 20, 2024
1 parent f754fac commit 2368417
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVParser;
import org.apache.commons.csv.CSVRecord;
import org.apache.logging.log4j.util.Strings;
import org.opensearch.OpenSearchException;
import org.opensearch.SpecialPermission;
import org.opensearch.action.DocWriteRequest;
Expand All @@ -53,6 +52,7 @@
import org.opensearch.common.xcontent.XContentFactory;
import org.opensearch.common.xcontent.XContentHelper;
import org.opensearch.common.xcontent.XContentType;
import org.opensearch.core.common.Strings;
import org.opensearch.core.xcontent.XContentBuilder;
import org.opensearch.geospatial.annotation.VisibleForTesting;
import org.opensearch.geospatial.constants.IndexSetting;
Expand Down Expand Up @@ -230,7 +230,7 @@ public XContentBuilder createDocument(final String[] fields, final String[] valu
builder.field(IP_RANGE_FIELD_NAME, values[0]);
builder.startObject(DATA_FIELD_NAME);
for (int i = 1; i < fields.length; i++) {
if (Strings.isBlank(values[i])) {
if (!Strings.hasText(values[i])) {
continue;
}
builder.field(fields[i], values[i]);
Expand Down

0 comments on commit 2368417

Please sign in to comment.