james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Burrell Donkin" <robertburrelldon...@gmail.com>
Subject Re: jSieve 0.2 API feedback
Date Thu, 02 Oct 2008 18:47:40 GMT
hi boris

On Thu, Oct 2, 2008 at 7:16 PM, Boris Burtin <bburtin@zimbra.com> wrote:
> Thanks for releasing jSieve 0.2.  I've been playing around with it for the last couple
of weeks.  I got things working without too much trouble, but did find a few areas that I
think could be improved.  Thought I'd send around this list, in case you guys find it useful
when working on the next version.

thanks (i've opened JIRAs to record this information)

there are number of areas in the API that we've been working to
improve since the release 0.2

if you have the time, check out
http://svn.apache.org/repos/asf/james/jsieve/trunk/ and tell us what
you think

> 1) The ConfigurationManager API currently exposes the Map that's read from the properties
file.  The caller adds extensions by using class names instead of Class objects.  It would
be better to have API's that accept Class<? extends ExecutableTest> and Class<? extends
ExecutableCommand> for better type checking at compile time.
>
> 2) Collections in API signatures should be parametrized.  It makes life much easier when
I know the type of the objects stored in a List or Map.

ATM jsieve supports version of java before 0.5

genertics are very useful in crafting better APIs but this would need
to be weighed against loss of compatibility. perhaps we could use
retroweaver.

> 3) MailAdapter.getContent() should return an InputStream or Reader.  Currently it returns
an Object, which the Body test assumes is a String.  This is ok 99.9% of the time, but I don't
want to risk an OOME if I ever have to process a message with a huge body.

yes, MailAdapter.getContent should be replaced. i lean towards an
explicit search call to all implementations to optimise.

- robert

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message