bharathv commented on a change in pull request #1999:
URL: https://github.com/apache/hbase/pull/1999#discussion_r447276364



##########
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:
       Oh sorry, didn't realize isFinite() is Java 8 and above.
   
   > I am unfamiliar with the code, so it may take a while to find where to add.
   
   A simple unit test, create a json using this JSONBean utilities and validate 
that it parses as expected?
   




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to