tracker issue : CF-4144890

select a category, or use search below
(searches all categories and all time range)
Title:

replace fails when replacement substring2 is a bigDecimal

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/Duplicate

Reporter/Name(from Bugbase): Matthew Hunnell / Matthew Hunnell (Matthew Hunnell)

Created: 04/25/2016

Components: Language, Functions

Versions: 2016

Failure Type:

Found In Build/Fixed In Build: CF2016_Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Windows 7 64-bit

Vote Count: 0

Duplicate ID:	CF-4126411

Problem Description:
Here is an example that fails. In my case, the real value for the theBigDecimal was being generated by selecting an integer column from a simple query against Oracle. As you can see below, the javacast from bigdecimal to string works, but whatever it is doing in the replace function fails.

<cfscript>
theBigDecimal = javaCast("bigdecimal", 123456);
theBigDecimalasString = javaCast("String", theBigDecimal);
newString = replace('This is my text with documentID in it','documentID',theBigDecimalasString);
writeDump('This Works: ' & newString);

writeDump('This Fails:');
newString = replace('This is my text with documentID in it','documentID',theBigDecimal);
</cfscript>

Actual Result:

Expected Result:

Any Workarounds:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4144890

External Customer Info:
External Company:  
External Customer Name: Matthew Hunnell
External Customer Email:  
External Test Config: laptop. Win 7 Enterprise. CF2016

Attachments:

Comments:

This issue is fixed and the fix for this issue will be available as part of ColdFusion 2016 Update 1.
Comment by Nimit S.
3023 | May 03, 2016 03:22:01 AM GMT