summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaylor H. Perkins <taylorhp@gmail.com>2013-04-30 12:04:52 -0700
committerTaylor H. Perkins <taylorhp@gmail.com>2013-04-30 12:04:52 -0700
commit62b2bb80f6b698571af766dec06100359bf1af7c (patch)
tree4cc8f8466f0369a0f5af499c22fc3394236e126e
parent1f6e789b7ee9698ab8c528a393c28cce500ace04 (diff)
downloadframeworks_base-62b2bb80f6b698571af766dec06100359bf1af7c.zip
frameworks_base-62b2bb80f6b698571af766dec06100359bf1af7c.tar.gz
frameworks_base-62b2bb80f6b698571af766dec06100359bf1af7c.tar.bz2
HeaderViewListAdapter: Correct thrown error names.
When accessing an invalid entry of the list, an IndexOutOfBounds exception is thrown, not an ArrayIndexOutOfBounds exception. Change-Id: I3cf59faab004fa6391d84f30f280e0c9bd92dc44 Signed-off-by: Taylor H. Perkins <taylorhp@gmail.com>
-rw-r--r--core/java/android/widget/HeaderViewListAdapter.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/java/android/widget/HeaderViewListAdapter.java b/core/java/android/widget/HeaderViewListAdapter.java
index 0685e61..222f108 100644
--- a/core/java/android/widget/HeaderViewListAdapter.java
+++ b/core/java/android/widget/HeaderViewListAdapter.java
@@ -145,7 +145,7 @@ public class HeaderViewListAdapter implements WrapperListAdapter, Filterable {
}
public boolean isEnabled(int position) {
- // Header (negative positions will throw an ArrayIndexOutOfBoundsException)
+ // Header (negative positions will throw an IndexOutOfBoundsException)
int numHeaders = getHeadersCount();
if (position < numHeaders) {
return mHeaderViewInfos.get(position).isSelectable;
@@ -161,12 +161,12 @@ public class HeaderViewListAdapter implements WrapperListAdapter, Filterable {
}
}
- // Footer (off-limits positions will throw an ArrayIndexOutOfBoundsException)
+ // Footer (off-limits positions will throw an IndexOutOfBoundsException)
return mFooterViewInfos.get(adjPosition - adapterCount).isSelectable;
}
public Object getItem(int position) {
- // Header (negative positions will throw an ArrayIndexOutOfBoundsException)
+ // Header (negative positions will throw an IndexOutOfBoundsException)
int numHeaders = getHeadersCount();
if (position < numHeaders) {
return mHeaderViewInfos.get(position).data;
@@ -182,7 +182,7 @@ public class HeaderViewListAdapter implements WrapperListAdapter, Filterable {
}
}
- // Footer (off-limits positions will throw an ArrayIndexOutOfBoundsException)
+ // Footer (off-limits positions will throw an IndexOutOfBoundsException)
return mFooterViewInfos.get(adjPosition - adapterCount).data;
}
@@ -206,7 +206,7 @@ public class HeaderViewListAdapter implements WrapperListAdapter, Filterable {
}
public View getView(int position, View convertView, ViewGroup parent) {
- // Header (negative positions will throw an ArrayIndexOutOfBoundsException)
+ // Header (negative positions will throw an IndexOutOfBoundsException)
int numHeaders = getHeadersCount();
if (position < numHeaders) {
return mHeaderViewInfos.get(position).view;
@@ -222,7 +222,7 @@ public class HeaderViewListAdapter implements WrapperListAdapter, Filterable {
}
}
- // Footer (off-limits positions will throw an ArrayIndexOutOfBoundsException)
+ // Footer (off-limits positions will throw an IndexOutOfBoundsException)
return mFooterViewInfos.get(adjPosition - adapterCount).view;
}