dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #22929
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11145: Fixed issue, changed the regex that matches numeric data values from \d syntax to [0-9], supports...
------------------------------------------------------------
revno: 11145
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-06-05 21:48:08 +0200
message:
Fixed issue, changed the regex that matches numeric data values from \d syntax to [0-9], supports older postgres versions and mysql
modified:
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.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/util/MathUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java 2013-04-21 18:28:51 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java 2013-06-05 19:48:08 +0000
@@ -47,7 +47,7 @@
private static final double TOLERANCE = 0.01;
public static final String NUMERIC_REGEXP = "^(0|-?[1-9]\\d*)(\\.\\d+)?$";
- public static final String NUMERIC_LENIENT_REGEXP = "^(-?\\d+)(\\.\\d+)?$";
+ public static final String NUMERIC_LENIENT_REGEXP = "^(-?[0-9]+)(\\.[0-9]+)?$";
private static final Pattern NUMERIC_PATTERN = Pattern.compile( NUMERIC_REGEXP );
private static final Pattern NUMERIC_LENIENT_PATTERN = Pattern.compile( NUMERIC_LENIENT_REGEXP );