"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core/src/main/java/com/google/zxing/client/result/EmailDoCoMoResultParser.java" between
zxing-zxing-3.4.0.tar.gz and zxing-zxing-3.4.1.tar.gz

About: ZXing ("zebra crossing") is a multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages.

EmailDoCoMoResultParser.java  (zxing-zxing-3.4.0):EmailDoCoMoResultParser.java  (zxing-zxing-3.4.1)
skipping to change at line 40 skipping to change at line 40
public final class EmailDoCoMoResultParser extends AbstractDoCoMoResultParser { public final class EmailDoCoMoResultParser extends AbstractDoCoMoResultParser {
private static final Pattern ATEXT_ALPHANUMERIC = Pattern.compile("[a-zA-Z0-9@ .!#$%&'*+\\-/=?^_`{|}~]+"); private static final Pattern ATEXT_ALPHANUMERIC = Pattern.compile("[a-zA-Z0-9@ .!#$%&'*+\\-/=?^_`{|}~]+");
@Override @Override
public EmailAddressParsedResult parse(Result result) { public EmailAddressParsedResult parse(Result result) {
String rawText = getMassagedText(result); String rawText = getMassagedText(result);
if (!rawText.startsWith("MATMSG:")) { if (!rawText.startsWith("MATMSG:")) {
return null; return null;
} }
String[] tos = matchDoCoMoPrefixedField("TO:", rawText, true); String[] tos = matchDoCoMoPrefixedField("TO:", rawText);
if (tos == null) { if (tos == null) {
return null; return null;
} }
for (String to : tos) { for (String to : tos) {
if (!isBasicallyValidEmailAddress(to)) { if (!isBasicallyValidEmailAddress(to)) {
return null; return null;
} }
} }
String subject = matchSingleDoCoMoPrefixedField("SUB:", rawText, false); String subject = matchSingleDoCoMoPrefixedField("SUB:", rawText, false);
String body = matchSingleDoCoMoPrefixedField("BODY:", rawText, false); String body = matchSingleDoCoMoPrefixedField("BODY:", rawText, false);
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)