dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18757
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7942: Added support for separator between key and value. Removed unused imports.
------------------------------------------------------------
revno: 7942
committer: Magnus Korvald <korvald@xxxxxxxxxxx>
branch nick: trunk
timestamp: Mon 2012-08-20 17:02:29 +0200
message:
Added support for separator between key and value. Removed unused imports.
modified:
dhis-2/dhis-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/input/SMSParserKeyValue.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-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/input/SMSParserKeyValue.java'
--- dhis-2/dhis-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/input/SMSParserKeyValue.java 2012-08-20 13:46:56 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/input/SMSParserKeyValue.java 2012-08-20 15:02:29 +0000
@@ -6,7 +6,6 @@
import java.util.HashMap;
import java.util.Map;
-import java.util.regex.MatchResult;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -44,7 +43,7 @@
public void setSeparator( String separator )
{
- String x = "(\\w+)\\s*:\\s*(\\d+)";
+ String x = "(\\w+)\\s*" + separator.trim() + "\\s*(\\d+)";
pattern = Pattern.compile( x );
}