bharathv commented on a change in pull request #1999:
URL: https://github.com/apache/hbase/pull/1999#discussion_r447251613
##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/util/JSONBean.java
##########
@@ -334,7 +334,7 @@ private static void writeObject(final JsonWriter writer,
final Object value) thr
} else if(value instanceof Number) {
Number n = (Number)value;
double doubleValue = n.doubleValue();
- if (Double.isNaN(doubleValue) || Double.isInfinite(doubleValue)) {
+ if (!Double.isNaN(doubleValue) && !Double.isInfinite(doubleValue)) {
Review comment:
Make the check consistent with other branches using Double.isFinite()?
That seems simple.
Also, it looks like there is some test gap here? Mind adding a quick test?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]