Don't convert the content-type to lower case in
MimeMessage.getContentType. The content-type may have optional parameters
that are case sensitive (boundary, name).
In removing the lower-case conversion from getContentType, a review was
made for inappropriate case-sensitive comparisons which use data obtained
with getContentType. The only ones found were in isMimeType in both
Message and MimeBodyPart.
Case-sensitive instances of isMimeType were made case-insensitive. Also,
isMimeType was moved from Message to MimeMessage for symmetry with
MimeBodyPart (MimeMessage & MimeBodyPart are similar and contain a good
bit of duplication such as this).
The unit test required fixing now that the case of the boundary text is
preserved.
References:
Commits 2c5186 and dc4002 added the toLowerCase to getContentType in
MimeMessage & MimeBodyPart (Issue 94).
Later, commit 50cd60 removed the toLowerCase addition from MimeBodyPart
(Issue 1289).
Fix the unit test to match.
All line endings in the unit test are now the same.
(Just for consistency. Not a big deal, since such problems are fixed when
the messages are run through EOLConvertingOutputStream.)
Create .project files for all the Ecplipse projects
so they will all have project names and can
all be brought into Ecplipse together with a single
'File -> Import -> Android ->
Existing Android Code Into Workspace'.
(Not bothering to remove the .project exclusion from
all .gitignore files. Once the .project files are
checked in, they will no longer be ignored.)
Modify the top .project file so that Eclipse knows
k9mail's dependence on it plugins, and thus will
build everything in the correct order.
With the latest Android SDK Rev. 22, the top .classpath file
needs modification or else K9 will not run (see parent commit 53fcdd1).
But the initial import of k9mail into Eclipse works more cleanly if the
.classpath file doesn't exist on import, in which case Eclipse creates it
automatically. So rather than modify the .classpath file, remove it
from git and leave it untracked.
(For an existing Eclipse project, this commit will remove the file from
the working directory. A corrected version can be restored with:
git checkout 53fcdd1 .classpath
git rm --cached .classpath)
Add .classpath to the top .gitignore, now that no
.classpath files are being tracked (with one exception,
see below).
Create a tests/.classpath so that Java can find the k9mail
project in order to build the k9mail-tests project.
Dynamically generate the CSS style for <pre> elements
for inclusion in the HTML <head> element when messages
are displayed.
This permits a user to change their font-family preference
for plain text messages and see the results immediately.
Obviously any old locally-stored messages that had their
font-family stored with them will continue to display using
that font-family, irrespective of the user's current
preference setting.
build.xml and tests/build.xml:
updated general format to match what is generated in a new project.
moved targets common to both to build_common.xml.
replaced some exec calls (perl, mv) and inline javascript with ant tasks (including extensions from Android and ant-contrib).
build.xml:
fixed indentation.
privatized targets that don't need to be called directly from command-line.
renamed some properties.
tests/build.xml:
renamed test project from K9 to K9Tests.
tools/ant-contrib.jar:
new!
.gitignore:
added note about local per-repo rules.
.gitignore:
added files created by new targets.
build.xml:
removed targets install and reinstall.
modified target help to depend on android_rules.help and only explain targets defined here.
updated target javadoc.
added targets lint-xml, lint-html, and monkey.
added private target -pre-clean to remove files created by new targets.
tests/AndroidManifest.xml:
updated note on running the tests.
tests/ant.properties:
removed test.runner as target test is now overridden.
tests/build.xml:
removed target test-report as it is now integrated with overridden target test.
overrode target test to disable deleting coverage.em and use the new test runner.
overrode target help to depend on android_rules.help and only explain targets defined here.
added targets javadoc, lint-xml, lint-html, and artifacts.
added private target -pre-clean to remove files created by new targets.
tests/clean-tests.sh:
new sh script to run through all the tests.