This commit is contained in:
Shay Banon 2012-08-21 14:22:12 +02:00
parent ef6ad6c966
commit f03ff2976a
1 changed files with 4 additions and 4 deletions

View File

@ -486,7 +486,7 @@ public final class XContentBuilder implements BytesStream {
try {
generator.writeNumber(value.setScale(scale, rounding).doubleValue());
} catch (ArithmeticException e) {
generator.writeString(value.toEngineeringString());
generator.writeString(value.toEngineeringString());
}
} else {
generator.writeString(value.toEngineeringString());
@ -500,14 +500,14 @@ public final class XContentBuilder implements BytesStream {
try {
generator.writeNumber(value.setScale(scale, rounding).doubleValue());
} catch (ArithmeticException e) {
generator.writeString(value.toEngineeringString());
generator.writeString(value.toEngineeringString());
}
} else {
generator.writeString(value.toEngineeringString());
}
return this;
}
}
public XContentBuilder field(String name, BytesReference value) throws IOException {
field(name);
if (!value.hasArray()) {