[ https://issues.apache.org/jira/browse/FLEX-23165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justin Mclean updated FLEX-23165: --------------------------------- Labels: easytest (was: ) > ObjectUtil.compare fails when same ByteArray is provided > -------------------------------------------------------- > > Key: FLEX-23165 > URL: https://issues.apache.org/jira/browse/FLEX-23165 > Project: Apache Flex > Issue Type: Bug > Components: .Unspecified - Framework > Affects Versions: Adobe Flex SDK 3.3 (Release) > Environment: Affected OS(s): All OS Platforms > Affected OS(s): All OS Platforms > Language Found: English > Reporter: Adobe JIRA > Labels: easytest > > Steps to reproduce: > 1. Create ByteArray object that consists of one single byte: > var obj:ByteArray=new ByteArray(); > obj.writeByte(1); > 2. Execute ObjectUtil.compare passing that same ByteArray reference > ObjectUtil.compare(obj, obj) > > Actual Results: > Runtime error occurs: > Error #2030: End of file was encountered. > at flash.utils::ByteArray/readByte() > > Expected Results: > ObjectUtil.compare(obj, obj) should return 0 > > Workaround (if any): > Before invoking ObjectUtil.compare(obj, obj) you need to check references obj > == obj > Problem cause: > Line 1224. > result = numericCompare(a.readByte(), b.readByte()); > (As 'a' and 'b' are same objects reading byte twice will fail) -- 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