Skip to content

Commit

Permalink
fix integ test
Browse files Browse the repository at this point in the history
Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
  • Loading branch information
rishabhmaurya committed May 14, 2024
1 parent db0159a commit d82d09a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class DerivedField implements Writeable, ToXContentFragment {
private final Script script;
private String sourceIndexedField;
private Map<String, String> properties;
private boolean ignoreMalformed;
private Boolean ignoreMalformed;
private String format;

public DerivedField(String name, String type, Script script) {
Expand All @@ -49,7 +49,7 @@ public DerivedField(StreamInput in) throws IOException {
}
sourceIndexedField = in.readOptionalString();
format = in.readOptionalString();
ignoreMalformed = Boolean.TRUE.equals(in.readOptionalBoolean());
ignoreMalformed = in.readOptionalBoolean();
}

@Override
Expand Down Expand Up @@ -82,7 +82,9 @@ public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params par
if (format != null) {
builder.field("format", format);
}
builder.field("ignore_malformed", ignoreMalformed);
if (ignoreMalformed != null) {
builder.field("ignore_malformed", ignoreMalformed);
}
builder.endObject();
return builder;
}
Expand Down Expand Up @@ -150,7 +152,7 @@ public boolean equals(Object obj) {
&& Objects.equals(script, other.script)
&& Objects.equals(sourceIndexedField, other.sourceIndexedField)
&& Objects.equals(properties, other.properties)
&& ignoreMalformed == other.ignoreMalformed
&& Objects.equals(ignoreMalformed, other.ignoreMalformed)
&& Objects.equals(format, other.format);
}
}

0 comments on commit d82d09a

Please sign in to comment.