[FIX] normalize serialization of ScriptType in UpdateRequest

This commit is contained in:
Brian Murphy 2014-07-15 18:10:12 +01:00
parent da5fb34163
commit 86dfad24fe
1 changed files with 1 additions and 1 deletions

View File

@ -651,7 +651,7 @@ public class UpdateRequest extends InstanceShardOperationRequest<UpdateRequest>
out.writeString(id); out.writeString(id);
out.writeOptionalString(routing); out.writeOptionalString(routing);
out.writeOptionalString(script); out.writeOptionalString(script);
if (script != null && out.getVersion().onOrAfter(Version.V_1_3_0)) { if (Strings.hasLength(script) && out.getVersion().onOrAfter(Version.V_1_3_0)) {
ScriptService.ScriptType.writeTo(scriptType, out); ScriptService.ScriptType.writeTo(scriptType, out);
} }
out.writeOptionalString(scriptLang); out.writeOptionalString(scriptLang);