Skip to content

Commit 8fbf72d

Browse files
removed unused fields
1 parent 67b7d37 commit 8fbf72d

File tree

2 files changed

+1
-30
lines changed

2 files changed

+1
-30
lines changed

server/src/main/java/org/elasticsearch/action/admin/cluster/storedscripts/GetStoredScriptResponse.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
package org.elasticsearch.action.admin.cluster.storedscripts;
2121

22+
import org.elasticsearch.Version;
2223
import org.elasticsearch.action.ActionResponse;
2324
import org.elasticsearch.common.ParseField;
2425
import org.elasticsearch.common.io.stream.StreamInput;

server/src/main/java/org/elasticsearch/script/StoredScriptSource.java

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,6 @@ public class StoredScriptSource extends AbstractDiffable<StoredScriptSource> imp
6666
*/
6767
public static final ParseField SCRIPT_PARSE_FIELD = new ParseField("script");
6868

69-
/**
70-
* Standard {@link ParseField} for outer level of stored script source.
71-
*/
72-
public static final ParseField TEMPLATE_PARSE_FIELD = new ParseField("template");
73-
74-
/**
75-
* Standard {@link ParseField} for query on the inner field.
76-
*/
77-
public static final ParseField TEMPLATE_NO_WRAPPER_PARSE_FIELD = new ParseField("query");
78-
7969
/**
8070
* Standard {@link ParseField} for lang on the inner level.
8171
*/
@@ -191,26 +181,6 @@ private StoredScriptSource build(boolean ignoreEmpty) {
191181
PARSER.declareField(Builder::setOptions, XContentParser::mapStrings, OPTIONS_PARSE_FIELD, ValueType.OBJECT);
192182
}
193183

194-
private static StoredScriptSource parseRemaining(Token token, XContentParser parser) throws IOException {
195-
try (XContentBuilder builder = XContentFactory.jsonBuilder()) {
196-
if (token != Token.START_OBJECT) {
197-
builder.startObject();
198-
builder.copyCurrentStructure(parser);
199-
builder.endObject();
200-
} else {
201-
builder.copyCurrentStructure(parser);
202-
}
203-
204-
String source = Strings.toString(builder);
205-
206-
if (source == null || source.isEmpty()) {
207-
DEPRECATION_LOGGER.deprecated("empty templates should no longer be used");
208-
}
209-
210-
return new StoredScriptSource(Script.DEFAULT_TEMPLATE_LANG, source, Collections.emptyMap());
211-
}
212-
}
213-
214184
/**
215185
* This will parse XContent into a {@link StoredScriptSource}. The following formats can be parsed:
216186
*

0 commit comments

Comments
 (0)