From b85f0b64c0d2c9f66ad97ab9958f9d7631cd1852 Mon Sep 17 00:00:00 2001 From: Andrew Chen Date: Wed, 29 Dec 2010 07:17:43 +0000 Subject: [PATCH] Fix javadoc; make constant all caps. --- src/com/fsck/k9/helper/Utility.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/com/fsck/k9/helper/Utility.java b/src/com/fsck/k9/helper/Utility.java index c3fc00dc5..aa79d472e 100644 --- a/src/com/fsck/k9/helper/Utility.java +++ b/src/com/fsck/k9/helper/Utility.java @@ -664,17 +664,18 @@ public class Utility Log.w(K9.LOG_TAG, "cannot delete " + fromDir.getAbsolutePath()); } } - /** - * Figure out if this part hsa images. - * TODO: should only return true if we're an html part - */ - private static final String IMG_SRC_REGEX = "(?is:]+src\\s*=\\s*['\"]?([a-z]+)\\:)"; - private static final Pattern mImgPattern = Pattern.compile(IMG_SRC_REGEX); + private static final Pattern IMG_PATTERN = Pattern.compile(IMG_SRC_REGEX); + /** + * Figure out if this part has images. + * TODO: should only return true if we're an html part + * @param message Content to evaluate + * @return True if it has external images; false otherwise. + */ public static boolean hasExternalImages(final String message) { - Matcher imgMatches = mImgPattern.matcher(message); + Matcher imgMatches = IMG_PATTERN.matcher(message); while (imgMatches.find()) { if (!imgMatches.group(1).equals("content")) @@ -692,7 +693,4 @@ public class Utility } return false; } - - - }