dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #05871
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1846: Improved robustness for report table regression
------------------------------------------------------------
revno: 1846
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Wed 2010-05-12 20:23:51 +0200
message:
Improved robustness for report table regression
modified:
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/Grid.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/Grid.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/Grid.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/Grid.java 2010-05-12 18:23:51 +0000
@@ -152,7 +152,7 @@
if ( grid.size() != columnValues.size() )
{
- throw new IllegalStateException( "Column values are not equal to number of rows" );
+ throw new IllegalStateException( "Number of column values (" + columnValues.size() + ") is not equal to number of rows (" + grid.size() + ")" );
}
for ( int i = 0; i < grid.size(); i++ )
@@ -198,6 +198,10 @@
{
regressionColumn.add( String.valueOf( getRounded( predicted, 1 ) ) );
}
+ else
+ {
+ regressionColumn.add( null );
+ }
}
addColumn( regressionColumn );