Skip to content

Commit

Permalink
Merge pull request #4 from rahul1193/rahul/rest-client-1.4.1
Browse files Browse the repository at this point in the history
changed locale to root
  • Loading branch information
brandonkearby authored Jan 5, 2017
2 parents 00cc3f6 + de09c1f commit 9fcb0da
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

package org.elasticsearch.common.xcontent;

import org.elasticsearch.Version;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.elasticsearch.script.ScriptService;

import java.io.IOException;
import java.util.Locale;
import java.util.Map;

import static com.google.common.collect.Maps.newHashMap;
Expand Down Expand Up @@ -110,7 +111,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
if (version.onOrAfter(Version.V_5_0_0)) {
builder.startObject(ScriptFilterParser.NAME);
builder.startObject("script");
builder.field(this.scriptType.name().toLowerCase(), script);
builder.field(this.scriptType.name().toLowerCase(Locale.ROOT), script);

if (this.lang != null) {
builder.field("lang", lang);
Expand Down

0 comments on commit 9fcb0da

Please sign in to comment.