Tiny bug fix, need to deal with no query params case correctly

git-svn-id: https://zxing.googlecode.com/svn/trunk@410 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2008-06-10 19:44:47 +00:00
parent 8319cf2097
commit 2cc9d7f630

View file

@ -55,11 +55,15 @@ public final class EmailAddressParsedResult extends AbstractDoCoMoParsedResult {
emailAddress = emailAddress.substring(0, queryStart);
}
Hashtable nameValues = parseNameValuePairs(rawText);
if (emailAddress.length() == 0) {
emailAddress = (String) nameValues.get("to");
String subject = null;
String body = null;
if (nameValues != null) {
if (emailAddress.length() == 0) {
emailAddress = (String) nameValues.get("to");
}
subject = (String) nameValues.get("subject");
body = (String) nameValues.get("body");
}
String subject = (String) nameValues.get("subject");
String body = (String) nameValues.get("body");
return new EmailAddressParsedResult(emailAddress, subject, body, rawText);
} else {
if (!EmailDoCoMoParsedResult.isBasicallyValidEmailAddress(rawText)) {