make catch block empty to improve performance

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

Branch: refs/heads/develop
Commit: d626e1c0e719b8619fd5476bf8b0f7a5c1bb25ae
Parents: a7109ba
Author: Justin Mclean <[email protected]>
Authored: Fri Jan 3 13:40:14 2014 +1100
Committer: Justin Mclean <[email protected]>
Committed: Fri Jan 3 13:40:14 2014 +1100

----------------------------------------------------------------------
 .../projects/framework/src/mx/collections/ListCollectionView.as | 4 +---
 frameworks/projects/framework/src/mx/collections/Sort.as        | 5 ++---
 2 files changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/d626e1c0/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/framework/src/mx/collections/ListCollectionView.as 
b/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
index 8f4ff02..95972fb 100644
--- a/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
+++ b/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
@@ -1290,14 +1290,12 @@ public class ListCollectionView extends Proxy
         }
 
         var value:Object;
-        try
+               try
         {
             value = getItemAt(index);
         }
         catch(e:Error)
         {
-            // the cursor was over something that is not yet on the client
-            value = null;
         }
         return new ListCollectionViewBookmark(value,
                                               this,

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/d626e1c0/frameworks/projects/framework/src/mx/collections/Sort.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/collections/Sort.as 
b/frameworks/projects/framework/src/mx/collections/Sort.as
index c9d21c9..a1c7333 100644
--- a/frameworks/projects/framework/src/mx/collections/Sort.as
+++ b/frameworks/projects/framework/src/mx/collections/Sort.as
@@ -405,14 +405,13 @@ public class Sort extends EventDispatcher implements ISort
                     fieldName = fieldList[i];
                     if (fieldName)
                     {
-                        var hasFieldName:Boolean;
-                        try
+                        var hasFieldName:Boolean = false;     
+                                               try
                         {
                             hasFieldName = values[fieldName] !== undefined;
                         }
                         catch(e:Error)
                         {
-                            hasFieldName = false;
                         }
                         if (hasFieldName)
                         {

Reply via email to