Remove Strings#splitStringToArray
This commit replaces the uses of Strings#splitStringToArray in favor of String#split as this method has been removed from core. Relates elastic/elasticsearch#2175 Original commit: elastic/x-pack-elasticsearch@97ec094fa0
This commit is contained in:
parent
a243647ea1
commit
4a1591f2a8
|
@ -14,7 +14,6 @@ import org.elasticsearch.Version;
|
|||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.bulk.BulkRequest;
|
||||
import org.elasticsearch.action.index.IndexRequest;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.bytes.BytesArray;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
|
@ -131,7 +130,7 @@ public class HttpExporterTemplateTests extends AbstractExporterTemplateTestCase
|
|||
}
|
||||
return newResponse(200, "{\"errors\": false, \"msg\": \"successful bulk request\"}");
|
||||
default:
|
||||
String[] paths = Strings.splitStringToArray(request.getPath(), '/');
|
||||
String[] paths = request.getPath().split("/");
|
||||
|
||||
// Templates
|
||||
if ((paths != null) && (paths.length > 0) && ("_template".equals(paths[0]))) {
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.watcher.support.xcontent;
|
||||
|
||||
import org.elasticsearch.common.Strings;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -24,7 +22,7 @@ public class ObjectPath {
|
|||
}
|
||||
|
||||
private static Object evalContext(String path, Object ctx) {
|
||||
String[] parts = Strings.splitStringToArray(path, '.');
|
||||
String[] parts = path.split("\\.");
|
||||
StringBuilder resolved = new StringBuilder();
|
||||
for (String part : parts) {
|
||||
if (ctx == null) {
|
||||
|
|
Loading…
Reference in New Issue