FLEX-33058
Minor refactoring while reading codeȘ
-simplified if statements
-corrected asdocs
-optimized imports
-removed unused variables


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

Branch: refs/heads/develop
Commit: 99a0c527a3a5fe76379c0e147cc9939159e4fb65
Parents: 7c8f7f5
Author: Mihai Chira <[email protected]>
Authored: Tue Feb 16 12:28:20 2016 +0100
Committer: Mihai Chira <[email protected]>
Committed: Tue Feb 16 12:28:20 2016 +0100

----------------------------------------------------------------------
 .../collections/HierarchicalCollectionView.as   |  4 +--
 .../framework/src/mx/collections/ArrayList.as   |  3 +-
 .../framework/src/mx/utils/ObjectUtil.as        |  4 +--
 .../treeClasses/HierarchicalViewCursor.as       | 36 ++++++++------------
 4 files changed, 18 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/99a0c527/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionView.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionView.as
 
b/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionView.as
index 987a684..b3b7258 100644
--- 
a/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionView.as
+++ 
b/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionView.as
@@ -390,9 +390,7 @@ public class HierarchicalCollectionView extends 
EventDispatcher
      *
      *  @param item The Object that defines the node to look for.
      *
-     *  @param <code>true</code> if the collection contains the item,
-     *
-     *  @return <code>true</code> if the data item is in the collection, 
+     *  @return <code>true</code> if the data item is in the collection,
      *  and <code>false</code> if not.
      *  
      *  @langversion 3.0

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/99a0c527/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 c2f1a1b..276afc5 100644
--- a/frameworks/projects/framework/src/mx/collections/ArrayList.as
+++ b/frameworks/projects/framework/src/mx/collections/ArrayList.as
@@ -22,7 +22,6 @@ package mx.collections
  
 import flash.events.EventDispatcher;
 import flash.events.IEventDispatcher;
-import flash.system.ApplicationDomain;
 import flash.utils.IDataInput;
 import flash.utils.IDataOutput;
 import flash.utils.IExternalizable;
@@ -660,7 +659,7 @@ public class ArrayList extends EventDispatcher
     }
     
     /**
-     *  Ensures that only the source property is seralized.
+     *  Ensures that only the source property is serialized.
      *  @private
      */
     public function readExternal(input:IDataInput):void

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/99a0c527/frameworks/projects/framework/src/mx/utils/ObjectUtil.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/utils/ObjectUtil.as 
b/frameworks/projects/framework/src/mx/utils/ObjectUtil.as
index 5934878..4a939b3 100644
--- a/frameworks/projects/framework/src/mx/utils/ObjectUtil.as
+++ b/frameworks/projects/framework/src/mx/utils/ObjectUtil.as
@@ -61,7 +61,7 @@ public class ObjectUtil
 
     /**
      *  Compares the Objects and returns an integer value 
-     *  indicating if the first item is less than greater than or equal to
+     *  indicating if the first item is less than, greater than, or equal to
      *  the second item.
      *  This method will recursively compare properties on nested objects and
      *  will return as soon as a non-zero result is found.
@@ -88,7 +88,7 @@ public class ObjectUtil
      *  In this case the <code>info</code> property will be turned into a 
string
      *  when performing the comparison.</p>
      *
-     *  @return Return 0 if a and b are null, NaN, or equal. 
+     *  @return Return 0 if a and b are equal, or both null or NaN.
      *  Return 1 if a is null or greater than b. 
      *  Return -1 if b is null or greater than a. 
      *  

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/99a0c527/frameworks/projects/mx/src/mx/controls/treeClasses/HierarchicalViewCursor.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/mx/src/mx/controls/treeClasses/HierarchicalViewCursor.as 
b/frameworks/projects/mx/src/mx/controls/treeClasses/HierarchicalViewCursor.as
index 6e2951f..65e9b20 100644
--- 
a/frameworks/projects/mx/src/mx/controls/treeClasses/HierarchicalViewCursor.as
+++ 
b/frameworks/projects/mx/src/mx/controls/treeClasses/HierarchicalViewCursor.as
@@ -20,17 +20,16 @@
 package mx.controls.treeClasses
 {
 
-import flash.events.EventDispatcher;
-import flash.utils.Dictionary;
-import mx.collections.CursorBookmark;
-import mx.collections.ICollectionView;
-import mx.collections.IList;
-import mx.collections.IViewCursor;
-import mx.events.CollectionEvent;
-import mx.events.CollectionEventKind;
-import mx.utils.UIDUtil;
-
-[ExcludeClass]
+       import flash.events.EventDispatcher;
+       import flash.utils.Dictionary;
+
+       import mx.collections.CursorBookmark;
+       import mx.collections.ICollectionView;
+       import mx.collections.IViewCursor;
+       import mx.events.CollectionEvent;
+       import mx.events.CollectionEventKind;
+
+       [ExcludeClass]
 
 /**
  *  @private
@@ -84,11 +83,7 @@ public class HierarchicalViewCursor extends EventDispatcher
                modelCursor = model.createCursor();
                
                //check to see if the model has more than one top level items
-               if (model.length > 1)
-                       more = true;
-               else 
-                       more = false;
-                       
+               more = model.length > 1;
     }
 
     
//--------------------------------------------------------------------------
@@ -787,10 +782,7 @@ public class HierarchicalViewCursor extends EventDispatcher
     {
                childNodes = [];
                modelCursor.seek(CursorBookmark.FIRST, 0);
-               if (model.length > 1)
-                       more = true;
-               else
-                       more = false;
+               more = model.length > 1;
         currentChildIndex = 0;
         parentNodes = [];
         childIndexStack = [];
@@ -807,7 +799,7 @@ public class HierarchicalViewCursor extends EventDispatcher
                childIndexStack = [];
                _currentDepth = 1;
                parentNodes = [];
-               var emptyBranch:Boolean = false;
+
                //first move to the end of the top level collection
                modelCursor.seek(CursorBookmark.LAST, 0);
                //if its a branch and open then get children for the last item
@@ -866,7 +858,7 @@ public class HierarchicalViewCursor extends EventDispatcher
                var i:int;
                var n:int;
         var node:Object;
-               var nodeParent:Object
+               var nodeParent:Object;
         var parent:Object;
         var parentStack:Array;
         var parentTable:Dictionary;

Reply via email to