Title: 
  java.lang.ClassCastException when looping over query and returning a structure in a try block
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Bryan Henderson / Bryan Henderson (Bryan Henderson)
Created: 04/17/2015
Components: Language, CF Component
Versions: 11.0
Failure Type: Crash
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Normal / All users will encounter
Locale/System: ALL / Windows 7 64-bit
Vote Count: 2
Problem Description:
A component defined as follows:
<cfcomponent>
	<cffunction name="foo">
		<cftry>
			<cfloop query="#QueryNew('one')#">
			</cfloop>
			<cfcatch>
				<cfreturn bar(a={b = 0}) />
			</cfcatch>
		</cftry>
	</cffunction>
</cfcomponent>
will cause a java.lang.ClassCastException when instantiated with createObject function or cfobject tag.
Steps to Reproduce:
create a component as defined above named "test.cfc".
in another file, instantiate an instance of the test component:
<cfobject component="test" name="test" />
Actual Result:
runtime exception:
{
  Message = "",
  StackTrace = "java.lang.ClassCastException",
  Suppressed = [],
  TagContext = [],
  Type = "java.lang.ClassCastException"
}
Expected Result:
continued program execution
Any Workarounds:
Do not use a try block
OR
do not pass a structure the the function in the cfreturn tag
OR
use cfoutput instead of cfquery
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID:	3971871
External Customer Info:
External Company:  
External Customer Name: Bryan
External Customer Email:  
External Test Config: My Hardware and Environment details:
CF 11,0,05,293506 on Windows 7 running on Dell Precision M6700
  Attachments:
Comments: