Skip to content

Commit

Permalink
add another instanceof check on Date and not direct check
Browse files Browse the repository at this point in the history
  • Loading branch information
kimchy committed Nov 17, 2011
1 parent 09fe743 commit b0880e1
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ private static void writeValue(XContentGenerator gen, Object value) throws IOExc
gen.writeBinary((byte[]) value);
} else if (value instanceof Date) {
gen.writeString(XContentBuilder.defaultDatePrinter.print(((Date) value).getTime()));
} else if (type == java.sql.Date.class) {
gen.writeString(XContentBuilder.defaultDatePrinter.print(((java.sql.Date) value).getTime()));
} else {
gen.writeString(value.toString());
}
Expand Down

0 comments on commit b0880e1

Please sign in to comment.