Repository: flex-sdk
Updated Branches:
  refs/heads/release4.12.0 27236b658 -> 874716440


FLEX-34108 Change to simpler implementation. On 10.2/10.3 no issue as the 
function shouldn't be called directly.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/87471644
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/87471644
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/87471644

Branch: refs/heads/release4.12.0
Commit: 8747164401f9ab4ad0dc8ac522912a3890aabd0f
Parents: 27236b6
Author: Justin Mclean <jmcl...@apache.org>
Authored: Wed Feb 26 11:06:22 2014 +1100
Committer: Justin Mclean <jmcl...@apache.org>
Committed: Wed Feb 26 11:06:22 2014 +1100

----------------------------------------------------------------------
 .../framework/src/mx/collections/ArrayCollection.as  | 13 ++-----------
 .../framework/src/mx/collections/ArrayList.as        | 15 +++------------
 2 files changed, 5 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/87471644/frameworks/projects/framework/src/mx/collections/ArrayCollection.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/framework/src/mx/collections/ArrayCollection.as 
b/frameworks/projects/framework/src/mx/collections/ArrayCollection.as
index ab195b9..6d91c88 100644
--- a/frameworks/projects/framework/src/mx/collections/ArrayCollection.as
+++ b/frameworks/projects/framework/src/mx/collections/ArrayCollection.as
@@ -149,6 +149,7 @@ public class ArrayCollection extends ListCollectionView 
implements IExternalizab
 
        /**
         *  Converts an Array Collection to JavaScript Object Notation (JSON) 
format.
+        *  Called by the JSON.stringify() method and should not be called 
directly.
         *  
         *  @langversion 3.0
         *  @playerversion Flash 11
@@ -157,17 +158,7 @@ public class ArrayCollection extends ListCollectionView 
implements IExternalizab
         */
        public function toJSON(s:String):*
        {
-               var array:Array = toArray();
-               
-               if (ApplicationDomain.currentDomain.hasDefinition("JSON"))
-               {
-                       var json:Class = 
Class(ApplicationDomain.currentDomain.getDefinition("JSON"));
-                       return json["stringify"](array);
-               }
-               else
-               {
-                       return '{"error": "Not supported on Flash Player 10"}';
-               }
+               return toArray();
        }
        
     /**

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/87471644/frameworks/projects/framework/src/mx/collections/ArrayList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/collections/ArrayList.as 
b/frameworks/projects/framework/src/mx/collections/ArrayList.as
index 42ac624..79545d3 100644
--- a/frameworks/projects/framework/src/mx/collections/ArrayList.as
+++ b/frameworks/projects/framework/src/mx/collections/ArrayList.as
@@ -273,7 +273,8 @@ public class ArrayList extends EventDispatcher
     
//--------------------------------------------------------------------------
 
        /**
-        *  Converts an Array Collection to JavaScript Object Notation (JSON) 
format.
+        *  Converts an Array List to JavaScript Object Notation (JSON) format.
+        *      Called by the JSON.stringify() method and should not be called 
directly.
         *  
         *  @langversion 3.0
         *  @playerversion Flash 11
@@ -282,17 +283,7 @@ public class ArrayList extends EventDispatcher
         */
        public function toJSON(s:String):*
        {
-               var array:Array = toArray();
-               
-               if (ApplicationDomain.currentDomain.hasDefinition("JSON"))
-               {
-                       var json:Class = 
Class(ApplicationDomain.currentDomain.getDefinition("JSON"));
-                       return json["stringify"](array);
-               }
-               else
-               {
-                       return '{"error": "Not supported on Flash Player 10"}';
-               }
+               return toArray();
        }
        
     /**

Reply via email to