You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by rw...@apache.org on 2017/12/07 15:38:53 UTC
svn commit: r1817385 -
/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewIndexBindMapping.java
Author: rwhitcomb
Date: Thu Dec 7 15:38:53 2017
New Revision: 1817385
URL: http://svn.apache.org/viewvc?rev=1817385&view=rev
Log:
Tweak of ListViewIndexBindMapping to fix indents and to more generally
support "Number" in the "indexOf" method (more than just "Integer").
Modified:
pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewIndexBindMapping.java
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewIndexBindMapping.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewIndexBindMapping.java?rev=1817385&r1=1817384&r2=1817385&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewIndexBindMapping.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewIndexBindMapping.java Thu Dec 7 15:38:53 2017
@@ -40,11 +40,11 @@ public class ListViewIndexBindMapping im
*/
@Override
public int indexOf(List<?> listData, Object value) {
- if (value instanceof Integer) {
- int iValue = ((Integer)value).intValue();
- if (iValue >= -1 && iValue < listData.getLength()) {
- return iValue;
- }
+ if (value instanceof Number) {
+ int iValue = ((Number)value).intValue();
+ if (iValue >= -1 && iValue < listData.getLength()) {
+ return iValue;
+ }
}
return -1;
}