You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2014/01/03 03:51:01 UTC
[2/5] git commit: [flex-sdk] [refs/heads/develop] - make catch block
empty to improve performance
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 <jm...@apache.org>
Authored: Fri Jan 3 13:40:14 2014 +1100
Committer: Justin Mclean <jm...@apache.org>
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)
{