Loading src/com/fsck/k9/mail/internet/MimeBodyPart.java +9 −19 Original line number Diff line number Diff line Loading @@ -77,35 +77,25 @@ public class MimeBodyPart extends BodyPart { public String getContentType() throws MessagingException { String contentType = getFirstHeader(MimeHeader.HEADER_CONTENT_TYPE); if (contentType == null) { return "text/plain"; } else { return contentType; } return (contentType == null) ? "text/plain" : contentType; } public String getDisposition() throws MessagingException { String contentDisposition = getFirstHeader(MimeHeader.HEADER_CONTENT_DISPOSITION); if (contentDisposition == null) { return null; } else { return contentDisposition; } return getFirstHeader(MimeHeader.HEADER_CONTENT_DISPOSITION); } public String getContentId() throws MessagingException { String contentId = getFirstHeader(MimeHeader.HEADER_CONTENT_ID); if (contentId == null) { return null; } else { } int first = contentId.indexOf('<'); int last = contentId.lastIndexOf('>'); if (first != -1 && last != -1) { return contentId.substring(first + 1, last); } else { return contentId; } } return (first != -1 && last != -1) ? contentId.substring(first + 1, last) : contentId; } public String getMimeType() throws MessagingException { Loading src/com/fsck/k9/mail/internet/MimeMessage.java +2 −11 Original line number Diff line number Diff line Loading @@ -130,20 +130,11 @@ public class MimeMessage extends Message { @Override public String getContentType() throws MessagingException { String contentType = getFirstHeader(MimeHeader.HEADER_CONTENT_TYPE); if (contentType == null) { return "text/plain"; } else { return contentType.toLowerCase(); } return (contentType == null) ? "text/plain" : contentType.toLowerCase(); } public String getDisposition() throws MessagingException { String contentDisposition = getFirstHeader(MimeHeader.HEADER_CONTENT_DISPOSITION); if (contentDisposition == null) { return null; } else { return contentDisposition; } return getFirstHeader(MimeHeader.HEADER_CONTENT_DISPOSITION); } public String getContentId() throws MessagingException { return null; Loading Loading
src/com/fsck/k9/mail/internet/MimeBodyPart.java +9 −19 Original line number Diff line number Diff line Loading @@ -77,35 +77,25 @@ public class MimeBodyPart extends BodyPart { public String getContentType() throws MessagingException { String contentType = getFirstHeader(MimeHeader.HEADER_CONTENT_TYPE); if (contentType == null) { return "text/plain"; } else { return contentType; } return (contentType == null) ? "text/plain" : contentType; } public String getDisposition() throws MessagingException { String contentDisposition = getFirstHeader(MimeHeader.HEADER_CONTENT_DISPOSITION); if (contentDisposition == null) { return null; } else { return contentDisposition; } return getFirstHeader(MimeHeader.HEADER_CONTENT_DISPOSITION); } public String getContentId() throws MessagingException { String contentId = getFirstHeader(MimeHeader.HEADER_CONTENT_ID); if (contentId == null) { return null; } else { } int first = contentId.indexOf('<'); int last = contentId.lastIndexOf('>'); if (first != -1 && last != -1) { return contentId.substring(first + 1, last); } else { return contentId; } } return (first != -1 && last != -1) ? contentId.substring(first + 1, last) : contentId; } public String getMimeType() throws MessagingException { Loading
src/com/fsck/k9/mail/internet/MimeMessage.java +2 −11 Original line number Diff line number Diff line Loading @@ -130,20 +130,11 @@ public class MimeMessage extends Message { @Override public String getContentType() throws MessagingException { String contentType = getFirstHeader(MimeHeader.HEADER_CONTENT_TYPE); if (contentType == null) { return "text/plain"; } else { return contentType.toLowerCase(); } return (contentType == null) ? "text/plain" : contentType.toLowerCase(); } public String getDisposition() throws MessagingException { String contentDisposition = getFirstHeader(MimeHeader.HEADER_CONTENT_DISPOSITION); if (contentDisposition == null) { return null; } else { return contentDisposition; } return getFirstHeader(MimeHeader.HEADER_CONTENT_DISPOSITION); } public String getContentId() throws MessagingException { return null; Loading