Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Michael Battenfeld / Michael Battenfeld (Battlefield)
Created: 11/28/2012
Versions: 10.0
Failure Type: Crash
Found In Build/Fixed In Build: Final / CF10_Update14
Priority/Frequency: Minor / Unknown
Locale/System: English / Windows 7 64-bit
Vote Count: 0
Problem Description:
The function isJSON throws an unexpected exception.
Steps to Reproduce:
<cfoutput>#isJSON("12e")#</cfoutput>
Actual Result:
"JSON parsing failure at character 3:'e' in 12e
...
Caused by: java.lang.ArrayIndexOutOfBoundsException: 3
at coldfusion.runtime.JSONUtils$ParserState.nextChar(JSONUtils.java:1959)
at coldfusion.runtime.JSONUtils.parseNumber(JSONUtils.java:1443)
at coldfusion.runtime.JSONUtils.parseObject(JSONUtils.java:1076)
at coldfusion.runtime.JSONUtils.parseJSON(JSONUtils.java:1017)
at coldfusion.runtime.JSONUtils.isJSON(JSONUtils.java:216)
... 101 more
Expected Result:
No exception, result false/NO.
Any Workarounds:
Currently we just encapsule the test into a try-catch-block. This should not be required and is not optimal from a performance perspective.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3373247
Deployment Phase: Release Candidate
External Customer Info:
External Company:
External Customer Name: Battlefield
External Customer Email:
Attachments:
Comments: