A question about TnyCamelHeader

Hi tinymailers :),

the Camel implementation of TnyHeader returns the special string
"Invalid" for all the get_xxx (where xxx is a field of the header)
whenever the header does not have this value set.

This behavior is not present in the contract of these interfaces, and
could be obviously different for each possible implementation. So the
caller should always check if the returned value is not "Invalid" in
order to know if it's right or not (well we could do it more generic,
checking that the returned value is a valid email address). So I guess,
why returning "Invalid" instead of NULL for example?

As I saw, all the calls to this getters inside tinymail assume that the
returned value is not NULL, but it won't be too difficult to change all
of them.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]