Title:
Implicit array within function call and other requirements produces java.lang.ClassCastException
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): Chris Hopkins / Chris Hopkins (Chris Hopkins)
Created: 05/14/2015
Components: Language
Versions: 11.0
Failure Type: Incorrect w/Workaround
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Normal / Few users will encounter
Locale/System: ALL / Win 2008 Server R2 64 bit
Vote Count: 1
Problem Description:
Ok stupidly odd one this.
a query cfloop next to a directly outputed function call with an array litteral as an argument that is within a cfoutput makes CF11 die.
Steps to Reproduce:
<!--- random test query - original was from a database --->
<cfset test_query = queryNew('a,b') />
<!--- a random function that takes an array --->
<cffunction name="getCustomSelectField">
<cfargument name="array" type="array" />
<cfreturn "it worked" />
</cffunction>
<cfoutput>
<!--- what we do here seems not to matter just that the cfloop exists is enough of an issue --->
<cfloop query="test_query">
</cfloop>
<!--- the main issue here is the array litteral as an argument and that we are directly outputing the result --->
#getCustomSelectField(
array = []
)#
</cfoutput>
Actual Result:
Error casting an object of type to an incompatible type. This usually indicates a programming error in Java, although it could also mean you have tried to use a foreign object in a different way than it was designed.
java.lang.ClassCastException
Expected Result:
it worked
Any Workarounds:
LOADS - dont use a litteral. Store the littleral or function result in a variable, use two seperate cfoutputs.... the list goes on its very specifc but pops up randomly and is Very annoying.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3988223
External Customer Info:
External Company:
External Customer Name: Chris
External Customer Email:
External Test Config: My Hardware and Environment details: CF11 - win 7 / Win server 2012 - IIS 7.5
Attachments:
Comments: