flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject [3/3] git commit: [flex-sdk] - Be consistant with creating new Arrays and Objects
Date Fri, 26 Apr 2013 01:32:19 GMT
Be consistant with creating new Arrays and Objects


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

Branch: refs/heads/develop
Commit: 4388da8f2fe902dbdcab78ffd89bf1b1bf24188e
Parents: e8615b1
Author: Justin Mclean <jmclean@apache.org>
Authored: Fri Apr 26 09:07:52 2013 +1000
Committer: Justin Mclean <jmclean@apache.org>
Committed: Fri Apr 26 09:07:52 2013 +1000

----------------------------------------------------------------------
 .../framework/src/mx/collections/ArrayList.as      |    2 +-
 .../framework/src/mx/collections/AsyncListView.as  |    6 +++---
 .../projects/framework/src/mx/core/DesignLayer.as  |    2 +-
 .../projects/framework/src/mx/core/UIComponent.as  |    6 +++---
 .../projects/framework/src/mx/effects/Pause.as     |    2 +-
 .../projects/framework/src/mx/states/AddItems.as   |    4 ++--
 .../framework/src/mx/styles/AdvancedStyleClient.as |    2 +-
 .../src/spark/components/SplitViewNavigator.as     |    2 +-
 .../src/spark/components/TabbedViewNavigator.as    |    2 +-
 .../supportClasses/StyleableStageText.as           |    2 +-
 .../src/spark/transitions/FlipViewTransition.as    |    2 +-
 .../src/spark/transitions/SlideViewTransition.as   |    6 +++---
 .../src/spark/transitions/ViewTransitionBase.as    |    6 +++---
 .../projects/rpc/src/mx/messaging/Channel.as       |    2 +-
 .../rpc/src/mx/rpc/http/HTTPMultiService.as        |    4 ++--
 .../rpc/src/mx/rpc/http/SerializationFilter.as     |    2 +-
 .../spark/src/spark/collections/SubListView.as     |    4 ++--
 .../spark/src/spark/components/DataGrid.as         |    6 +++---
 .../projects/spark/src/spark/components/Form.as    |    2 +-
 .../spark/components/gridClasses/GridDimensions.as |    2 +-
 .../components/gridClasses/GridHeaderViewLayout.as |    2 +-
 .../spark/components/supportClasses/ListBase.as    |    3 ++-
 .../supportClasses/SkinnableComponent.as           |    4 ++--
 .../projects/spark/src/spark/effects/Animate.as    |    2 +-
 .../src/spark/effects/AnimateTransitionShader.as   |    4 +---
 .../spark/src/spark/effects/animation/Animation.as |    2 +-
 .../effects/supportClasses/AnimateInstance.as      |    8 ++++----
 .../supportClasses/AnimateTransformInstance.as     |    6 +++---
 .../spark/src/spark/filters/ShaderFilter.as        |    4 ++--
 .../supportClasses/DateTimeFormatterEx.as          |    8 ++++----
 .../globalization/supportClasses/FormatPattern.as  |    2 +-
 .../spark/src/spark/layouts/ConstraintLayout.as    |   14 +++++++-------
 .../spark/TextFieldGridItemRendererInclude.as      |    2 +-
 33 files changed, 63 insertions(+), 64 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/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 1a5e701..b207d42 100644
--- a/frameworks/projects/framework/src/mx/collections/ArrayList.as
+++ b/frameworks/projects/framework/src/mx/collections/ArrayList.as
@@ -433,7 +433,7 @@ public class ArrayList extends EventDispatcher
         if (addListLength == 0)
             return;
 
-        const addedItems:Array = new Array();
+        const addedItems:Array = [];
         
         disableEvents();
         for (var i:int = 0; i < addListLength; i++)

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/framework/src/mx/collections/AsyncListView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/collections/AsyncListView.as b/frameworks/projects/framework/src/mx/collections/AsyncListView.as
index fbc3901..f543f84 100644
--- a/frameworks/projects/framework/src/mx/collections/AsyncListView.as
+++ b/frameworks/projects/framework/src/mx/collections/AsyncListView.as
@@ -426,7 +426,7 @@ public class AsyncListView extends OnDemandEventDispatcher implements
IList
      */
     private function sparseCopy(a:Array):Array
     {
-        const r:Array = new Array();
+        const r:Array = [];
         var index:int = 0;
         for each (var item:* in a)
         {
@@ -567,8 +567,8 @@ public class AsyncListView extends OnDemandEventDispatcher implements
IList
     //
     //--------------------------------------------------------------------------
 
-    private const pendingResponders:Array = new Array();
-    private const failedItems:Array = new Array();
+    private const pendingResponders:Array = [];
+    private const failedItems:Array = [];
     
     /**
      *  @private

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/framework/src/mx/core/DesignLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/core/DesignLayer.as b/frameworks/projects/framework/src/mx/core/DesignLayer.as
index d0d7526..dd6b4e6 100644
--- a/frameworks/projects/framework/src/mx/core/DesignLayer.as
+++ b/frameworks/projects/framework/src/mx/core/DesignLayer.as
@@ -157,7 +157,7 @@ package mx.core
         /**
          * @private
          */  
-        private var layerChildren:Array = new Array();
+        private var layerChildren:Array = [];
         
         //----------------------------------
         //  visible

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/framework/src/mx/core/UIComponent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/core/UIComponent.as b/frameworks/projects/framework/src/mx/core/UIComponent.as
index 2219043..8e46058 100644
--- a/frameworks/projects/framework/src/mx/core/UIComponent.as
+++ b/frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -11164,7 +11164,7 @@ public class UIComponent extends FlexSprite
         else
         {
             if (!deferredSetStyles)
-                deferredSetStyles = new Object();
+                deferredSetStyles = {};
             deferredSetStyles[styleProp] = newValue;
         }   
     }
@@ -12534,8 +12534,8 @@ public class UIComponent extends FlexSprite
     {
         if (errorObjectArray === null)
         {
-            errorObjectArray = new Array();
-            errorArray = new Array();
+            errorObjectArray = [];
+            errorArray = [];
         }
         
         var validatorIndex:int = errorObjectArray.indexOf(event.target);

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/framework/src/mx/effects/Pause.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/effects/Pause.as b/frameworks/projects/framework/src/mx/effects/Pause.as
index 5c36bff..d67a9fa 100644
--- a/frameworks/projects/framework/src/mx/effects/Pause.as
+++ b/frameworks/projects/framework/src/mx/effects/Pause.as
@@ -85,7 +85,7 @@ public class Pause extends TweenEffect
         // target of type IEventDispatcher instead, either here or separately
         // in the target attribute
         if (!target)
-           target = new Object();
+           target = {};
            
         super(target);
 

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/framework/src/mx/states/AddItems.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/states/AddItems.as b/frameworks/projects/framework/src/mx/states/AddItems.as
index 8745134..6fc388c 100644
--- a/frameworks/projects/framework/src/mx/states/AddItems.as
+++ b/frameworks/projects/framework/src/mx/states/AddItems.as
@@ -685,7 +685,7 @@ public class AddItems extends OverrideBase
                 // For destinations like ArrayCollection we don't want to 
                 // affect the array in-place in some cases, as ListCollectionView a
                 // attempts to compare the "before" and "after" state of the array
-                assign(dest, propertyName, new Array());
+                assign(dest, propertyName, []);
             }      
         }
         
@@ -812,7 +812,7 @@ public class AddItems extends OverrideBase
         var tempArray:Array = isStyle ? dest.getStyle(propertyName) : dest[propertyName];
         
         if (!tempArray)
-            tempArray = new Array();
+            tempArray = [];
         
         if (startIndex == -1)
             startIndex = tempArray.length;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/framework/src/mx/styles/AdvancedStyleClient.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/styles/AdvancedStyleClient.as b/frameworks/projects/framework/src/mx/styles/AdvancedStyleClient.as
index 4af7ca8..8ec8a1d 100644
--- a/frameworks/projects/framework/src/mx/styles/AdvancedStyleClient.as
+++ b/frameworks/projects/framework/src/mx/styles/AdvancedStyleClient.as
@@ -298,7 +298,7 @@ public class AdvancedStyleClient extends EventDispatcher
         else
         {
             if (!deferredSetStyles)
-                deferredSetStyles = new Object();
+                deferredSetStyles = {};
 
             deferredSetStyles[styleProp] = newValue;
         }

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as
b/frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as
index 9ba0583..e097fb8 100644
--- a/frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as
+++ b/frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as
@@ -749,7 +749,7 @@ public class SplitViewNavigator extends ViewNavigatorBase
     override public function saveViewData():Object
     {
         var object:Object = super.saveViewData();
-        var dataArray:Array = new Array();
+        var dataArray:Array = [];
         
         // Push each navigator's persistence object to the data array
         for (var i:int = 0; i < numViewNavigators; i++)

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
b/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
index 108bd36..fd2f05d 100644
--- a/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
+++ b/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
@@ -405,7 +405,7 @@ public class TabbedViewNavigator extends ViewNavigatorBase implements
ISelectabl
         // model and uses mxmlContent to manage children.  To maintain backwards 
         // compatibility, the return type for this method remained the same.
         // As a result, the value vector needs to be converted to an array
-        var contentArray:Array = new Array();
+        var contentArray:Array = [];
         
         for each (var navigator:ViewNavigatorBase in value)
         {

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as
b/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as
index 545f979..f3792b5 100644
--- a/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as
+++ b/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as
@@ -3095,7 +3095,7 @@ class StageTextPool
             // default value.
             if (!cleanProperties)
             {
-                cleanProperties = new Object();
+                cleanProperties = {};
                 
                 cleanProperties["autoCapitalize"] = result.autoCapitalize;
                 cleanProperties["autoCorrect"] = result.autoCorrect;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as
b/frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as
index d6a919d..ef8bd5c 100644
--- a/frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as
+++ b/frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as
@@ -257,7 +257,7 @@ public class FlipViewTransition extends ViewTransitionBase
         
         // Initialize the property bag used to save some of our
         // properties that are then restored after the transition is over.
-        navigatorProps = new Object(); 
+        navigatorProps = {}; 
         
         // Snapshot the entire navigator.
         var oldVisibility:Boolean = endView.visible;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as
b/frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as
index 752a75b..7dd12f5 100644
--- a/frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as
+++ b/frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as
@@ -277,7 +277,7 @@ public class SlideViewTransition extends ViewTransitionBase
         
         // Initialize the property bag used to save some of our
         // properties that are then restored after the transition is over.
-        navigatorProps = new Object(); 
+        navigatorProps = {}; 
         navigatorProps.initialHeight = navigator.height;
         
         // Determine if we will be animating the tabBar as part of the
@@ -347,7 +347,7 @@ public class SlideViewTransition extends ViewTransitionBase
         // the start of our transition, ensuring that they are cached as 
         // surfaces, and adjust z-order if necessary.
 
-        var slideTargets:Array = new Array();
+        var slideTargets:Array = [];
         
         endViewNeedsValidations = false;
         startViewNeedsValidations = false;
@@ -485,7 +485,7 @@ public class SlideViewTransition extends ViewTransitionBase
         // Prepare our start and end view elements by positioning them prior to 
         // the start of our transition, ensuring that they are cached as 
         // surfaces, and adjust z-order if necessary.
-        var slideTargets:Array = new Array();
+        var slideTargets:Array = [];
         
         endViewNeedsValidations = false;
         startViewNeedsValidations = false;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as
b/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as
index d445837..57af224 100644
--- a/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as
+++ b/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as
@@ -878,9 +878,9 @@ public class ViewTransitionBase extends EventDispatcher
         var animatedProperty:String;
         
         var actionBarSkin:UIComponent = actionBar.skin;
-        var slideTargets:Array = new Array();
-        var fadeOutTargets:Array = new Array();
-        var fadeInTargets:Array = new Array();
+        var slideTargets:Array = [];
+        var fadeOutTargets:Array = [];
+        var fadeInTargets:Array = [];
         
         // Return if we have a noop action bar transition mode.
         if (!actionBar || actionBarTransitionMode == ACTION_BAR_MODE_NONE || 

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/rpc/src/mx/messaging/Channel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/rpc/src/mx/messaging/Channel.as b/frameworks/projects/rpc/src/mx/messaging/Channel.as
index b00ac3a..b0d5cae 100644
--- a/frameworks/projects/rpc/src/mx/messaging/Channel.as
+++ b/frameworks/projects/rpc/src/mx/messaging/Channel.as
@@ -812,7 +812,7 @@ public class Channel extends EventDispatcher implements IMXMLObject
             return;
 
         // Add urls to an array, so they can be shuffled.
-        var urls:Array = new Array();
+        var urls:Array = [];
         for each (var url:XML in clientLoadBalancingProps.url)
             urls.push(url.toString());
 

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/rpc/src/mx/rpc/http/HTTPMultiService.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/rpc/src/mx/rpc/http/HTTPMultiService.as b/frameworks/projects/rpc/src/mx/rpc/http/HTTPMultiService.as
index e11aeec..9744134 100644
--- a/frameworks/projects/rpc/src/mx/rpc/http/HTTPMultiService.as
+++ b/frameworks/projects/rpc/src/mx/rpc/http/HTTPMultiService.as
@@ -487,7 +487,7 @@ public dynamic class HTTPMultiService extends AbstractService
         else
         {
             var op:AbstractOperation;
-            var ops:Object = new Object();
+            var ops:Object = {};
             for (var i:int = 0; i < ol.length; i++)
             {
                 op = AbstractOperation(ol[i]);
@@ -505,7 +505,7 @@ public dynamic class HTTPMultiService extends AbstractService
         // Note: does not preserve order of the elements
         if (operations == null)
             return null;
-        var ol:Array = new Array();
+        var ol:Array = [];
         for (var i:String in operations)
         {
             var op:AbstractOperation = operations[i];

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/rpc/src/mx/rpc/http/SerializationFilter.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/rpc/src/mx/rpc/http/SerializationFilter.as b/frameworks/projects/rpc/src/mx/rpc/http/SerializationFilter.as
index 3e53d87..84aa6ee 100644
--- a/frameworks/projects/rpc/src/mx/rpc/http/SerializationFilter.as
+++ b/frameworks/projects/rpc/src/mx/rpc/http/SerializationFilter.as
@@ -69,7 +69,7 @@ use namespace mx_internal;
 public class SerializationFilter
 {
     // replaces/returns previous with that name or null
-    static mx_internal var filterForResultFormatTable:Object = new Object();
+    static mx_internal var filterForResultFormatTable:Object = {};
 
     /**
      * This static function is used to register a new SerializationFilter for a 

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/spark/src/spark/collections/SubListView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/collections/SubListView.as b/frameworks/projects/spark/src/spark/collections/SubListView.as
index f76e87e..c6ababf 100644
--- a/frameworks/projects/spark/src/spark/collections/SubListView.as
+++ b/frameworks/projects/spark/src/spark/collections/SubListView.as
@@ -276,7 +276,7 @@ public class SubListView extends EventDispatcher implements IList
         const viewEvent:CollectionEvent = createCollectionEvent(event.kind);
         viewEvent.location = event.location - startIndex;
         
-        const items:Array = new Array();
+        const items:Array = [];
         viewEvent.items = items;
         
         var location:int = event.location;
@@ -312,7 +312,7 @@ public class SubListView extends EventDispatcher implements IList
         var viewLocation:int = Math.max(startIndex, event.location);
         viewEvent.location = viewLocation - startIndex;
         
-        const items:Array = new Array();
+        const items:Array = [];
         viewEvent.items = items;
         
         for each (var item:Object in event.items)

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/spark/src/spark/components/DataGrid.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/DataGrid.as b/frameworks/projects/spark/src/spark/components/DataGrid.as
index fa567c5..85e4b43 100644
--- a/frameworks/projects/spark/src/spark/components/DataGrid.as
+++ b/frameworks/projects/spark/src/spark/components/DataGrid.as
@@ -1209,7 +1209,7 @@ public class DataGrid extends SkinnableContainerBase
      *  
      *  See getPartProperty(), setPartProperty().
      */
-    private var gridProperties:Object = new Object();
+    private var gridProperties:Object = {};
     
     /**
      *  @private
@@ -3597,7 +3597,7 @@ public class DataGrid extends SkinnableContainerBase
             // Cover Properties
             
             const gridPropertyBits:uint = gridProperties.propertyBits;
-            gridProperties = new Object();
+            gridProperties = {};
             
             for (var propertyName:String in gridPropertyDefaults)
             {
@@ -4963,7 +4963,7 @@ public class DataGrid extends SkinnableContainerBase
      */
     private function createSortFields(columnIndices:Vector.<int>, previousFields:Array):Array

     {
-        const fields:Array = new Array(); // return value
+        const fields:Array = []; // return value
         
         for each (var columnIndex:int in columnIndices)
         {

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/spark/src/spark/components/Form.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/Form.as b/frameworks/projects/spark/src/spark/components/Form.as
index c2e7740..b371b49 100644
--- a/frameworks/projects/spark/src/spark/components/Form.as
+++ b/frameworks/projects/spark/src/spark/components/Form.as
@@ -141,7 +141,7 @@ public class Form extends SkinnableContainer
     //
     //--------------------------------------------------------------------------
     
-    mx_internal var _invalidElements:Array = new Array();
+    mx_internal var _invalidElements:Array = [];
     
     /**
      *  A sorted Array of descendant elements that are in an invalid state.

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
b/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
index ace0c23..f60ae79 100644
--- a/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
+++ b/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
@@ -56,7 +56,7 @@ public class GridDimensions
      *  Inserts specified elements starting from startIndex.
      *  
      *  <pre>Our implementation of:
-     *      var argArray:Array = new Array();
+     *      var argArray:Array = [];
      *      for each (var x:Number in values)
      *      {
      *          argArray.push(x);

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
b/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
index 218c9f8..bbc320f 100644
--- a/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
+++ b/frameworks/projects/spark/src/spark/components/gridClasses/GridHeaderViewLayout.as
@@ -81,7 +81,7 @@ public class GridHeaderViewLayout extends LayoutBase
      *  Cached header renderer heights maintained by the measure() method, 
      *  and the current content height.
      */
-    private const rendererHeights:Array = new Array();
+    private const rendererHeights:Array = [];
     private var maxRendererHeight:Number = 0;
     
     /**

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as b/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
index 50fcdb3..37e3233 100644
--- a/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
+++ b/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
@@ -307,7 +307,8 @@ public class ListBase extends SkinnableDataContainer implements IDataProviderEnh
         if (isNull || isEmpty)
         {
             var originalProvider:IList = isEmpty ? dataProvider : null;
-            dataProvider = new mx.collections.ArrayList([ new Object() ]);
+			//TODO (jmclean) seems odd to me double check
+            dataProvider = new mx.collections.ArrayList([ {} ]);
             validateNow();
         }
         

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
b/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
index d0489be..579b95b 100644
--- a/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
+++ b/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
@@ -956,10 +956,10 @@ public class SkinnableComponent extends UIComponent
             
             // Add to the dynamic parts cache
             if (!dynamicPartsCache)
-                dynamicPartsCache = new Object();
+                dynamicPartsCache = {};
                 
             if (!dynamicPartsCache[partName])
-                dynamicPartsCache[partName] = new Array();
+                dynamicPartsCache[partName] = [];
             
             dynamicPartsCache[partName].push(instance);
             

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/spark/src/spark/effects/Animate.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/effects/Animate.as b/frameworks/projects/spark/src/spark/effects/Animate.as
index 45b075e..a4f316c 100644
--- a/frameworks/projects/spark/src/spark/effects/Animate.as
+++ b/frameworks/projects/spark/src/spark/effects/Animate.as
@@ -372,7 +372,7 @@ public class Animate extends Effect
             {
                 var horizontalMove:Boolean;
                 var verticalMove:Boolean;
-                affectedProperties = new Array();
+                affectedProperties = [];
                 for (var i:int = 0; i < motionPaths.length; ++i)
                 {
                     var effectHolder:MotionPath = MotionPath(motionPaths[i]);

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as b/frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as
index 2626f25..67f8fb6 100644
--- a/frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as
+++ b/frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as
@@ -316,9 +316,7 @@ public class AnimateTransitionShader extends Animate
         }
         // The effect instance will retrieve the bitmap and bounds from the object
         // stored here
-        var bmHolder:Object = new Object();
-        bmHolder["bitmap"] = bmData;
-        bmHolder["bounds"] = bounds;
+        var bmHolder:Object = {bitmap:bmData, bounds:bounds};
         
         target.filters = tempFilters;
         

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/spark/src/spark/effects/animation/Animation.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/effects/animation/Animation.as b/frameworks/projects/spark/src/spark/effects/animation/Animation.as
index 7dda806..1c6ebe0 100644
--- a/frameworks/projects/spark/src/spark/effects/animation/Animation.as
+++ b/frameworks/projects/spark/src/spark/effects/animation/Animation.as
@@ -890,7 +890,7 @@ public final class Animation
     {
         var i:int;
         
-        currentValue = new Object();
+        currentValue = {};
         if (duration == 0)
         {
             for (i = 0; i < motionPaths.length; ++i)

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as
b/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as
index 3d12ffc..e25eea5 100644
--- a/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as
+++ b/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as
@@ -103,7 +103,7 @@ public class AnimateInstance extends EffectInstance implements IAnimationTarget
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    private var isStyleMap:Object = new Object();
+    private var isStyleMap:Object = {};
     
     /**
      *  @private.
@@ -502,7 +502,7 @@ public class AnimateInstance extends EffectInstance implements IAnimationTarget
                         mp.property == "horizontalCenter")
                     {
                         if (!disabledConstraintsMap)
-                            disabledConstraintsMap = new Object();
+                            disabledConstraintsMap = {};
                         disabledConstraintsMap[mp.property] = true;
                         mp.property = "x";
                         if (isValidValue(propertyChanges.start["width"]) &&
@@ -516,7 +516,7 @@ public class AnimateInstance extends EffectInstance implements IAnimationTarget
                     else
                     {
                         if (!disabledConstraintsMap)
-                            disabledConstraintsMap = new Object();
+                            disabledConstraintsMap = {};
                         disabledConstraintsMap[mp.property] = true;
                         mp.property = "y";
                         if (isValidValue(propertyChanges.start["height"]) &&
@@ -1041,7 +1041,7 @@ public class AnimateInstance extends EffectInstance implements IAnimationTarget
         if (!isNaN(value) && value != null)
         {
             if (!constraintsHolder)
-                constraintsHolder = new Object();
+                constraintsHolder = {};
             constraintsHolder[name] = value;
             // Now disable it - it will be re-enabled when effect finishes
             if (isProperty)

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as
b/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as
index cc7ce92..780906e 100644
--- a/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as
+++ b/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as
@@ -181,8 +181,8 @@ public class AnimateTransformInstance extends AnimateInstance
      * are populated when the effect instance is set up according to 
      * the properties/constraints affected by each transform effect.
      */
-    mx_internal var layoutConstraints:Object = new Object();
-    mx_internal var affectedProperties:Object = new Object();
+    mx_internal var layoutConstraints:Object = {};
+    mx_internal var affectedProperties:Object = {};
     
 
     //--------------------------------------------------------------------------
@@ -476,7 +476,7 @@ public class AnimateTransformInstance extends AnimateInstance
      */
     override public function play():void
     {
-        var autoProps:Object = new Object();
+        var autoProps:Object = {};
         var s:String;
         
         if (propertyChanges)

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/spark/src/spark/filters/ShaderFilter.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/filters/ShaderFilter.as b/frameworks/projects/spark/src/spark/filters/ShaderFilter.as
index 2663faa..985397c 100644
--- a/frameworks/projects/spark/src/spark/filters/ShaderFilter.as
+++ b/frameworks/projects/spark/src/spark/filters/ShaderFilter.as
@@ -444,7 +444,7 @@ public dynamic class ShaderFilter extends Proxy
         {
             // The shader has yet to be initialized, queue any properties,
             // the will be applied upon creation of the shader.
-            propertyQueue = propertyQueue ? propertyQueue : new Object();
+            propertyQueue = propertyQueue ? propertyQueue : {};
             propertyQueue[name] = value;
         }
     }
@@ -527,7 +527,7 @@ public dynamic class ShaderFilter extends Proxy
                 var index:int = indexForDimension(propertyInfo.type, dimension);
                 if (index != -1)
                 {
-                    var currentValue:Array = propertyInfo.value ? propertyInfo.value : new
Array();
+                    var currentValue:Array = propertyInfo.value ? propertyInfo.value : [];
                     currentValue[index] = value;
                     propertyInfo.value = currentValue;
                     return;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/spark/src/spark/globalization/supportClasses/DateTimeFormatterEx.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/globalization/supportClasses/DateTimeFormatterEx.as
b/frameworks/projects/spark/src/spark/globalization/supportClasses/DateTimeFormatterEx.as
index 7deed93..d3b16e3 100644
--- a/frameworks/projects/spark/src/spark/globalization/supportClasses/DateTimeFormatterEx.as
+++ b/frameworks/projects/spark/src/spark/globalization/supportClasses/DateTimeFormatterEx.as
@@ -986,7 +986,7 @@ public class DateTimeFormatterEx extends DateTimeFormatter
         const language:String = parsedLocale["language"];
         const script:String = parsedLocale["script"];
         const region:String = parsedLocale["region"];
-        const scoreList:Array = new Array();
+        const scoreList:Array = [];
         /*
         Score calculation method:
         Two of the languages are identical: Add 0x40
@@ -1119,7 +1119,7 @@ public class DateTimeFormatterEx extends DateTimeFormatter
                                            analyseDateElements:Boolean,
                                            analyseTimeElements:Boolean):Object
     {
-        const elementList:Array = new Array();
+        const elementList:Array = [];
         
         if (analyseDateElements)
             DateTimeFormatterEx.extractDateElements(pattern, elementList);
@@ -1128,10 +1128,10 @@ public class DateTimeFormatterEx extends DateTimeFormatter
             DateTimeFormatterEx.extractTimeElements(pattern, elementList);
         
         elementList.sortOn("index", Array.NUMERIC);
-        const processedElementList:Object = new Object();
+        const processedElementList:Object = {};
         for (var i:int = 0; i < elementList.length; i++)
         {
-            var element:Object = new Object();
+            var element:Object = {};
             element["index"] = i;
             element["pattern"] = elementList[i]["pattern"];
             var name:String = elementList[i]["name"];

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/spark/src/spark/globalization/supportClasses/FormatPattern.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/globalization/supportClasses/FormatPattern.as
b/frameworks/projects/spark/src/spark/globalization/supportClasses/FormatPattern.as
index 9c4f007..ce063bc 100644
--- a/frameworks/projects/spark/src/spark/globalization/supportClasses/FormatPattern.as
+++ b/frameworks/projects/spark/src/spark/globalization/supportClasses/FormatPattern.as
@@ -60,7 +60,7 @@ internal final class FormatPattern
     {
         super();
         this.pattern = pattern;
-        this.locales = new Object();
+        this.locales = {};
         for (var i:int = 0; i < locales.length; i++)
             this.locales[locales[i]] = true;
     }

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as b/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as
index 90bbd8a..c7d47a6 100644
--- a/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as
+++ b/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as
@@ -246,7 +246,7 @@ public class ConstraintLayout extends LayoutBase
     
     private var _constraintColumns:Vector.<ConstraintColumn> = new Vector.<ConstraintColumn>(0,
true);
     // An associative array of column id --> column index
-    private var columnsObject:Object = new Object();
+    private var columnsObject:Object = {};
     
     /**
      *  A Vector of ConstraintColumn instances that partition the target container.
@@ -273,14 +273,14 @@ public class ConstraintLayout extends LayoutBase
         if (value == null)
         {
             _constraintColumns = new Vector.<ConstraintColumn>(0, true);
-            columnsObject = new Object();
+            columnsObject = {};
             return;
         }
         
         var n:int = value.length;
         var col:ConstraintColumn;
         var temp:Vector.<ConstraintColumn> = value.slice();
-        var obj:Object = new Object();
+        var obj:Object = {};
         
         for (var i:int = 0; i < n; i++)
         {
@@ -305,7 +305,7 @@ public class ConstraintLayout extends LayoutBase
     
     private var _constraintRows:Vector.<ConstraintRow> = new Vector.<ConstraintRow>(0,
true);
     // An associative array of row id --> row index
-    private var rowsObject:Object = new Object();
+    private var rowsObject:Object = {};
     
     /**
      *  A Vector of ConstraintRow instances that partition the target container.
@@ -331,14 +331,14 @@ public class ConstraintLayout extends LayoutBase
         if (value == null)
         {
             _constraintRows = new Vector.<ConstraintRow>(0, true);
-            rowsObject = new Object();
+            rowsObject = {};
             return;
         }
         
         var n:int = value.length;
         var row:ConstraintRow;
         var temp:Vector.<ConstraintRow> = value.slice();
-        var obj:Object = new Object();
+        var obj:Object = {};
         rowBaselines = new Vector.<Array>();
         
         for (var i:int = 0; i < n; i++)
@@ -1614,7 +1614,7 @@ public class ConstraintLayout extends LayoutBase
         // Populate rowBaselines with baseline information from rows.
         var n:int = _constraintRows.length;
         var row:ConstraintRow;
-        var obj:Object = new Object();
+        var obj:Object = {};
         if (rowBaselines == null)
             rowBaselines = new Vector.<Array>();
         else

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4388da8f/frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as
b/frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as
index 37f865f..d9a4255 100644
--- a/frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as
+++ b/frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as
@@ -589,7 +589,7 @@ are identical, save the superclass and constructor names.  This file contains
th
         else
         {
             if (!deferredSetStyles)
-                deferredSetStyles = new Object();
+                deferredSetStyles = {};
             deferredSetStyles[styleProp] = newValue;
         }   
     }


Mime
View raw message