k9mail/k9mail_pgp_mime — pull request #10 by artbristol (2014-10-05 08:35:25+00:00)
Title: Art/more tidying arrays

I would like to introduce an interface for Message to separate the mutable methods, to make it easier to split Message into an immutable class for retrieved messages, and a mutable one during message composition. (Message flags would still be mutable).

First I want to get rid of the arrays everywhere, because they are covariant in Java which can lead to run time class-cast exceptions (e.g. I have ImutableMessage[], I pass it to a method expecting Message[], which adds a MutableMessage to it - bang, ArrayStoreException)

Using wildcard generics is better because the compiler can help, assuming all the K9 developers have enough experience with them.

This pull request depends on https://github.com/k9mail/k9mail_pgp_mime/pull/9