reformat
This commit is contained in:
parent
ef6ad6c966
commit
f03ff2976a
|
@ -486,7 +486,7 @@ public final class XContentBuilder implements BytesStream {
|
||||||
try {
|
try {
|
||||||
generator.writeNumber(value.setScale(scale, rounding).doubleValue());
|
generator.writeNumber(value.setScale(scale, rounding).doubleValue());
|
||||||
} catch (ArithmeticException e) {
|
} catch (ArithmeticException e) {
|
||||||
generator.writeString(value.toEngineeringString());
|
generator.writeString(value.toEngineeringString());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
generator.writeString(value.toEngineeringString());
|
generator.writeString(value.toEngineeringString());
|
||||||
|
@ -500,14 +500,14 @@ public final class XContentBuilder implements BytesStream {
|
||||||
try {
|
try {
|
||||||
generator.writeNumber(value.setScale(scale, rounding).doubleValue());
|
generator.writeNumber(value.setScale(scale, rounding).doubleValue());
|
||||||
} catch (ArithmeticException e) {
|
} catch (ArithmeticException e) {
|
||||||
generator.writeString(value.toEngineeringString());
|
generator.writeString(value.toEngineeringString());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
generator.writeString(value.toEngineeringString());
|
generator.writeString(value.toEngineeringString());
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public XContentBuilder field(String name, BytesReference value) throws IOException {
|
public XContentBuilder field(String name, BytesReference value) throws IOException {
|
||||||
field(name);
|
field(name);
|
||||||
if (!value.hasArray()) {
|
if (!value.hasArray()) {
|
||||||
|
|
Loading…
Reference in New Issue