diff --git a/CHANGELOG.md b/CHANGELOG.md index 0868a2b3..8befb4d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,4 +21,5 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), * Exclude lombok generated code from jacoco coverage report ([#268](https://github.com/opensearch-project/geospatial/pull/268)) ### Documentation ### Maintenance +* Change package for Strings.hasText ([#314](https://github.com/opensearch-project/geospatial/pull/314)) ### Refactoring diff --git a/src/main/java/org/opensearch/geospatial/action/upload/geojson/ContentBuilder.java b/src/main/java/org/opensearch/geospatial/action/upload/geojson/ContentBuilder.java index 551b1c06..66e708ed 100644 --- a/src/main/java/org/opensearch/geospatial/action/upload/geojson/ContentBuilder.java +++ b/src/main/java/org/opensearch/geospatial/action/upload/geojson/ContentBuilder.java @@ -14,7 +14,7 @@ import org.opensearch.action.index.IndexRequestBuilder; import org.opensearch.action.support.WriteRequest; import org.opensearch.client.Client; -import org.opensearch.common.Strings; +import org.opensearch.core.common.Strings; import org.opensearch.geospatial.GeospatialParser; /** diff --git a/src/main/java/org/opensearch/geospatial/action/upload/geojson/UploadGeoJSONRequestContent.java b/src/main/java/org/opensearch/geospatial/action/upload/geojson/UploadGeoJSONRequestContent.java index 0bcde2ab..eae60881 100644 --- a/src/main/java/org/opensearch/geospatial/action/upload/geojson/UploadGeoJSONRequestContent.java +++ b/src/main/java/org/opensearch/geospatial/action/upload/geojson/UploadGeoJSONRequestContent.java @@ -15,8 +15,8 @@ import lombok.AccessLevel; import lombok.AllArgsConstructor; -import org.opensearch.common.Strings; import org.opensearch.core.ParseField; +import org.opensearch.core.common.Strings; import org.opensearch.geospatial.GeospatialParser; /** diff --git a/src/main/java/org/opensearch/geospatial/stats/upload/UploadMetric.java b/src/main/java/org/opensearch/geospatial/stats/upload/UploadMetric.java index 0b744590..2dacef52 100644 --- a/src/main/java/org/opensearch/geospatial/stats/upload/UploadMetric.java +++ b/src/main/java/org/opensearch/geospatial/stats/upload/UploadMetric.java @@ -11,10 +11,10 @@ import lombok.Getter; -import org.opensearch.common.Strings; import org.opensearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamOutput; import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.Strings; import org.opensearch.core.xcontent.ToXContentFragment; import org.opensearch.core.xcontent.XContentBuilder; diff --git a/src/test/java/org/opensearch/geospatial/GeospatialRestTestCase.java b/src/test/java/org/opensearch/geospatial/GeospatialRestTestCase.java index 4ca9cfec..e787fc7e 100644 --- a/src/test/java/org/opensearch/geospatial/GeospatialRestTestCase.java +++ b/src/test/java/org/opensearch/geospatial/GeospatialRestTestCase.java @@ -33,7 +33,6 @@ import org.opensearch.client.Request; import org.opensearch.client.Response; import org.opensearch.common.CheckedConsumer; -import org.opensearch.common.Strings; import org.opensearch.common.UUIDs; import org.opensearch.common.geo.GeoJson; import org.opensearch.common.geo.ShapeRelation; @@ -41,6 +40,7 @@ import org.opensearch.common.xcontent.XContentFactory; import org.opensearch.common.xcontent.XContentType; import org.opensearch.common.xcontent.json.JsonXContent; +import org.opensearch.core.common.Strings; import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.geometry.Geometry; import org.opensearch.geospatial.action.upload.geojson.UploadGeoJSONRequestContent; @@ -87,7 +87,7 @@ protected static void createPipeline(String name, Optional description, builder.endObject(); Request request = new Request("PUT", buildPipelinePath(name)); - request.setJsonEntity(Strings.toString(builder)); + request.setJsonEntity(org.opensearch.common.Strings.toString(builder)); client().performRequest(request); } @@ -102,7 +102,7 @@ protected static void createIndex(String name, Settings settings, Map XContentBuilder builder = JsonXContent.contentBuilder().startObject(); build.accept(builder); builder.endObject(); - return Strings.toString(builder); + return org.opensearch.common.Strings.toString(builder); } public String buildSearchAggregationsBodyAsString(CheckedConsumer aggregationsBuilder)