[ https://issues.apache.org/jira/browse/FLEX-18697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13637750#comment-13637750 ]
Justin Mclean commented on FLEX-18697: -------------------------------------- Hard to see from DG code but if you run this through the debugger you see it's broken in 4.9.1: Test.as: package { public class TestClass { public var name:String public function TestClass(name:String) { this.name = name; } } } ObjectUtilTest.as <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" initialize="init(event)"> <fx:Script> <![CDATA[ import mx.events.FlexEvent; import mx.utils.ObjectUtil; protected function init(event:FlexEvent):void { var obj1:TestClass = new TestClass("Justin"); var obj2:TestClass = new TestClass("Nick"); ObjectUtil.getClassInfo(obj1, null, {includeReadOnly: true, includeTransient:false, uris:["mx_internal", "mx_object"]}); ObjectUtil.getClassInfo(obj1, null, {includeReadOnly: true, includeTransient:true, uris:["mx_internal", "mx_object"]}); // different so new object returned - in 4.9.1 it's incorrect cache is returned ObjectUtil.getClassInfo(obj2, null, {includeReadOnly: true, includeTransient:false, uris:["mx_internal", "mx_object"]}); // same so returns cache - in 4.9.1 wrong cache is return as above line reset cache } ]]> </fx:Script> </s:Application> > ObjectUtil.getCacheKey does not make cache key correctly > -------------------------------------------------------- > > Key: FLEX-18697 > URL: https://issues.apache.org/jira/browse/FLEX-18697 > Project: Apache Flex > Issue Type: Bug > Components: .Unspecified - Framework > Affects Versions: Adobe Flex SDK 3.2 (Release) > Environment: Affected OS(s): All OS Platforms > Affected OS(s): All OS Platforms > Language Found: English > Reporter: Adobe JIRA > Assignee: Nick Kwiatkowski > Labels: easyfix, easytest > Fix For: Apache Flex 4.10.0 > > > affected class: mx.utils.ObjectUtil > 1. call ObjectUtil.getClassInfo with options.includeReadonly = true > 2. call ObjectUtil.getClassInfo with options.includeReadonly = false > The result of step2 is same as the result of step1. > Because step2 just return cached result of step1. > see source code of getCacheKey function of ObjectUtil class > /* ---------+---------+---------+---------+---------+ */ > var value:String = options[flag] as String; > if (value != null) > key += value; > /* ---------+---------+---------+---------+---------+ */ > code of "options["includeReadOnly"] as String" is always null > Replacing that code to the following line will fix the problem: > key += options[flag].toString(); -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira