tracker issue : CF-3291001

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

cannot use array for-in loop with getMetaData().properties

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Henry Ho / Henry Ho (Henry Ho)

Created: 07/18/2012

Components: Language

Versions: 9.0.1

Failure Type: Incorrect w/Workaround

Found In Build/Fixed In Build: 9.0.1 /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Windows 7

Vote Count: 0

Problem Description:  cannot use for-in loop with getMetaData().properties

Steps to Reproduce:

x = new obj();
properties = getMetaData(x).properties;
for (var p in properties) {};

Actual Result:
You have attempted to dereference a scalar variable of type class [Ljava.lang.Object; as a structure with members.
coldfusion.runtime.ScopeCastException: You have attempted to dereference a scalar variable of type class [Ljava.lang.Object; as a structure with members.
	at coldfusion.runtime.Cast._Map(Cast.java:1247)

Expected Result:
no exception

Any Workarounds:
use good-old for(var i = 1; i<=arrayLen(properties); i++)

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

Watson Bug ID:	3291001

External Customer Info:
External Company:  
External Customer Name: henrylearn2rock
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

This bug was fixed in CF10 (Comment added from ex-user id:nawani)
Comment by Adobe D.
18702 | December 22, 2013 12:46:18 AM GMT