Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
XContentBuilder.field : StackOverflowError with Integer parameters #1324
After upgrading to 0.17.x from a 0.15.x version in a grails project, I've encountered a StackOverflowError when trying to add a Integer array (Integer) using the field() method.
Code sample to reproduce (groovy) :
Error returned :
It will also occured when using a Float or Double.
The line https://github.com/elasticsearch/elasticsearch/blob/master/modules/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/XContentBuilder.java#L631 is probably the reason of the issue since an Integer will be recognized as a Object, and will just infinitely call the field(String, Object) method.