d-c-manning commented on a change in pull request #1999:
URL: https://github.com/apache/hbase/pull/1999#discussion_r447263171



##########
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:
       @bharathv my understanding is that branch-1 is required to have java7 
compatibility, and I guess it only exists in java8: 
https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html#isFinite-double-
   
   I agree there is missing test coverage somewhere. I am unfamiliar with the 
code, so it may take a while to find where to add.




----------------------------------------------------------------
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]


Reply via email to