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 { 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()) {