dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #09115
[Branch ~dhis2-devs-core/dhis2/2.0.5] Rev 2105: Merged r 2339
------------------------------------------------------------
revno: 2105
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: 2.0.5
timestamp: Sat 2010-12-11 20:05:37 +0100
message:
Merged r 2339
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java
--
lp:~dhis2-devs-core/dhis2/2.0.5
https://code.launchpad.net/~dhis2-devs-core/dhis2/2.0.5
Your team DHIS 2 developers is subscribed to branch lp:~dhis2-devs-core/dhis2/2.0.5.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/2.0.5/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java 2010-09-14 09:54:51 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java 2010-12-11 19:05:37 +0000
@@ -28,6 +28,7 @@
*/
import static org.hisp.dhis.system.util.MathUtils.expressionIsTrue;
+import static org.hisp.dhis.system.util.MathUtils.getRounded;
import java.util.Collection;
import java.util.Date;
@@ -56,6 +57,8 @@
public class DefaultValidationRuleService
implements ValidationRuleService
{
+ private static final int DECIMALS = 1;
+
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
@@ -219,7 +222,7 @@
if ( violation )
{
- validationResults.add( new ValidationResult( period, source, validationRule, leftSide, rightSide ) );
+ validationResults.add( new ValidationResult( period, source, validationRule, getRounded( leftSide, DECIMALS ), getRounded( rightSide, DECIMALS ) ) );
}
}
}