You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2016/02/23 07:59:18 UTC
[jira] [Created] (SLING-5549) Better handling for Double.NaN
Chetan Mehrotra created SLING-5549:
--------------------------------------
Summary: Better handling for Double.NaN
Key: SLING-5549
URL: https://issues.apache.org/jira/browse/SLING-5549
Project: Sling
Issue Type: Improvement
Components: Extensions
Reporter: Chetan Mehrotra
Priority: Minor
Fix For: JMX Resource Provider 1.0.4, Commons JSON 2.0.18
Its possible that some JMX attribute results in Double.NaN which causes issue with JSON rendition
{noformat}
org.apache.sling.commons.json.JSONException: JSON does not allow
non-finite numbers
at org.apache.sling.commons.json.io.JSONRenderer.testNumberValidity(JSONRenderer.java:483)
at org.apache.sling.commons.json.JSONObject.testValidity(JSONObject.java:912)
at org.apache.sling.commons.json.JSONObject.put(JSONObject.java:856)
at org.apache.sling.commons.json.sling.JsonObjectCreator.createProperty(JsonObjectCreator.java:206)
at org.apache.sling.commons.json.sling.JsonObjectCreator.create(JsonObjectCreator.java:94)
at org.apache.sling.commons.json.sling.JsonObjectCreator.create(JsonObjectCreator.java:48)
at org.apache.sling.commons.json.sling.ResourceTraversor.adapt(ResourceTraversor.java:141)
at org.apache.sling.commons.json.sling.ResourceTraversor.collectResource(ResourceTraversor.java:128)
at org.apache.sling.commons.json.sling.ResourceTraversor.collectChildren(ResourceTraversor.java:99)
at org.apache.sling.commons.json.sling.ResourceTraversor.collectResources(ResourceTraversor.java:76)
at org.apache.sling.servlets.get.impl.helpers.JsonRendererServlet.doGet(JsonRendererServlet.java:100)
{noformat}
As a fix we should
# Skip such properties in JSON renderer
# Skip such attributes in JMX Resource ValueMap
See http://markmail.org/thread/ybuaioecpiuqupjo
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)