click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From med...@apache.org
Subject svn commit: r927795 - /click/trunk/click/framework/src/org/apache/click/control/Table.java
Date Fri, 26 Mar 2010 12:26:58 GMT
Author: medgar
Date: Fri Mar 26 12:26:58 2010
New Revision: 927795

URL: http://svn.apache.org/viewvc?rev=927795&view=rev
Log:
added DataProvider null check

Modified:
    click/trunk/click/framework/src/org/apache/click/control/Table.java

Modified: click/trunk/click/framework/src/org/apache/click/control/Table.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/control/Table.java?rev=927795&r1=927794&r2=927795&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/control/Table.java (original)
+++ click/trunk/click/framework/src/org/apache/click/control/Table.java Fri Mar 26 12:26:58
2010
@@ -1034,6 +1034,13 @@ public class Table extends AbstractContr
             if (getDataProvider() != null) {
                 Iterable iterableData = getDataProvider().getData();
 
+                if (iterableData == null) {
+                    String msg = "DataProvider '"
+                        + getDataProvider().getClass().getSimpleName()
+                        + "' returned null data";
+                    throw new IllegalStateException(msg);
+                }
+
                 if (iterableData instanceof List) {
                     rowList = (List) iterableData;
 



Mime
View raw message