tracker issue : CF-4198852

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

Incorrect method being used when method name matches internal method name

| View in Tracker

Status/Resolution/Reason: To Fix//BugVerified

Reporter/Name(from Bugbase): John Sieber / John Sieber ()

Created: 06/12/2017

Components: Language, Java Integration

Versions: 2016,11.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: Coldfusion 11 through 2016 Update 4 /

Priority/Frequency: Normal / Some users will encounter

Locale/System: ALL / Windows 10 64 bit

Vote Count: 0

Problem Description:
When using the jSoup Java library the ColdFusion array append() method is called instead of the jSoup append() method.

Steps to Reproduce:

jsoup = CreateObject("java","org.jsoup.Jsoup");
htmlstring = '<div id="main"><div class="routeBadge"></div></div>';
newBody = jsoup.parseBodyFragment(htmlstring);
routeBadge = newBody.select(".routeBadge");
routeBadge.append("<img src='https://tracker.adobe.com/api/search/something.png' />");
writedump(var=routeBadge);


Actual Result:
Depending on the version of jSoup, the above code will error or just not append any data using the append() jsoup method.

Expected Result:
The jSoup append() method will function correctly.

Any Workarounds:
More information available here: https://stackoverflow.com/questions/44442241/coldfusion-member-function-name-matches-jsoup-function-name-how-can-i-force-the/44445303#44445303

Attachments:

Comments: