Core: Improve XContentBuilder API.
This commit is contained in:
parent
c7a9b3da5b
commit
ac40eae3e3
|
@ -1017,7 +1017,7 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder map(Map<String, Object> map) throws IOException {
|
||||
public XContentBuilder map(Map<String, ?> map) throws IOException {
|
||||
if (map == null) {
|
||||
return nullValue();
|
||||
}
|
||||
|
@ -1103,10 +1103,10 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
}
|
||||
|
||||
|
||||
private void writeMap(Map<String, Object> map) throws IOException {
|
||||
private void writeMap(Map<String, ?> map) throws IOException {
|
||||
generator.writeStartObject();
|
||||
|
||||
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
||||
for (Map.Entry<String, ?> entry : map.entrySet()) {
|
||||
field(entry.getKey());
|
||||
Object value = entry.getValue();
|
||||
if (value == null) {
|
||||
|
|
Loading…
Reference in New Issue