XContentBuilder throws NPE on null Boolean, closes #1853.

This commit is contained in:
Shay Banon 2012-04-11 20:54:14 +03:00
parent ae69e7c472
commit ad07810610
1 changed files with 3 additions and 0 deletions

View File

@ -849,6 +849,9 @@ public final class XContentBuilder {
}
public XContentBuilder value(Boolean value) throws IOException {
if (value == null) {
return nullValue();
}
return value(value.booleanValue());
}