Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null pointer exception when adding BigDecimal field with value null #11699

Closed
sindrit opened this issue Jun 16, 2015 · 0 comments
Closed

Null pointer exception when adding BigDecimal field with value null #11699

sindrit opened this issue Jun 16, 2015 · 0 comments
Labels
>bug :Core/Infra/Transport API Transport client API good first issue low hanging fruit help wanted adoptme

Comments

@sindrit
Copy link

sindrit commented Jun 16, 2015

Other captialized numeric types, Integer, Double etc. have a null check when passed in to the XContentBuilder.field method. The XContentBuilder.field(String, BigDecimal) method however throws a NullPointerException.

For consistency it would be better to writeNull() if the BigDecimal value is null.

jpountz pushed a commit that referenced this issue Jun 25, 2015
Add a null-check for XContentBuilder#field for BigDecimals
jpountz pushed a commit that referenced this issue Jun 25, 2015
Add a null-check for XContentBuilder#field for BigDecimals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Core/Infra/Transport API Transport client API good first issue low hanging fruit help wanted adoptme
Projects
None yet
Development

No branches or pull requests

2 participants