Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport]Change package for Strings.hasText (#314) #317

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
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;
import org.opensearch.common.settings.Settings;
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;
Expand Down Expand Up @@ -101,7 +101,7 @@ protected static Response createPipeline(String name, Optional<String> descripti
builder.endObject();

Request request = new Request("PUT", buildPipelinePath(name));
request.setJsonEntity(Strings.toString(builder));
request.setJsonEntity(org.opensearch.common.Strings.toString(builder));
return client().performRequest(request);
}

Expand All @@ -118,7 +118,7 @@ protected Response createDatasource(final String name, Map<String, Object> prope
builder.endObject();

Request request = new Request(PUT, buildDatasourcePath(name));
request.setJsonEntity(Strings.toString(builder));
request.setJsonEntity(org.opensearch.common.Strings.toString(builder));
return client().performRequest(request);
}

Expand Down Expand Up @@ -178,7 +178,7 @@ protected Response updateDatasource(final String name, Map<String, Object> prope
builder.endObject();

Request request = new Request(PUT, String.join(URL_DELIMITER, buildDatasourcePath(name), SETTINGS));
request.setJsonEntity(Strings.toString(builder));
request.setJsonEntity(org.opensearch.common.Strings.toString(builder));
return client().performRequest(request);
}

Expand All @@ -188,7 +188,7 @@ protected Map<String, Object> simulatePipeline(final String name, List<Object> d
builder.endObject();

Request request = new Request(GET, String.join(URL_DELIMITER, buildPipelinePath(name), SIMULATE));
request.setJsonEntity(Strings.toString(builder));
request.setJsonEntity(org.opensearch.common.Strings.toString(builder));
Response response = client().performRequest(request);
return createParser(XContentType.JSON.xContent(), EntityUtils.toString(response.getEntity())).map();
}
Expand All @@ -199,7 +199,7 @@ protected static void createIndex(String name, Settings settings, Map<String, St
xContentBuilder.startObject(entry.getKey()).field(FIELD_TYPE_KEY, entry.getValue()).endObject();
}
xContentBuilder.endObject().endObject();
String mapping = Strings.toString(xContentBuilder);
String mapping = org.opensearch.common.Strings.toString(xContentBuilder);
createIndex(name, settings, mapping.substring(1, mapping.length() - 1));
}

Expand Down Expand Up @@ -346,7 +346,7 @@ public String buildContentAsString(CheckedConsumer<XContentBuilder, IOException>
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<XContentBuilder, IOException> aggregationsBuilder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
import org.opensearch.geospatial.ip2geo.jobscheduler.Datasource;
import org.opensearch.geospatial.ip2geo.jobscheduler.DatasourceUpdateService;
import org.opensearch.geospatial.ip2geo.processor.Ip2GeoProcessor;
import org.opensearch.geospatial.plugin.GeospatialPlugin;
import org.opensearch.ingest.IngestMetadata;
import org.opensearch.ingest.IngestService;
import org.opensearch.jobscheduler.spi.LockModel;
Expand Down