XContentBuilder.field : StackOverflowError with Integer[] parameters, closes #1324.

This commit is contained in:
Shay Banon 2011-09-12 22:44:55 +03:00
parent 36f364c998
commit 847938a88e
1 changed files with 19 additions and 0 deletions

View File

@ -513,6 +513,7 @@ public final class XContentBuilder {
return this;
}
public XContentBuilder field(XContentBuilderString name, String... value) throws IOException {
startArray(name);
for (String o : value) {
@ -522,6 +523,24 @@ public final class XContentBuilder {
return this;
}
public XContentBuilder field(String name, Object... value) throws IOException {
startArray(name);
for (Object o : value) {
value(o);
}
endArray();
return this;
}
public XContentBuilder field(XContentBuilderString name, Object... value) throws IOException {
startArray(name);
for (Object o : value) {
value(o);
}
endArray();
return this;
}
public XContentBuilder field(String name, int... value) throws IOException {
startArray(name);
for (Object o : value) {