You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Markus Wiederkehr <ma...@gmail.com> on 2008/11/09 11:52:42 UTC

[mime4j] Java 5?

Now that the decision to go for Java 5 seems to be made for jSieve and
Server, should Mime4j be upgraded to Java 5, too?

Markus

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


Re: [mime4j] Java 5?

Posted by Markus Wiederkehr <ma...@gmail.com>.
On Sun, Nov 9, 2008 at 7:52 PM, Oleg Kalnichevski <ol...@apache.org> wrote:
> On Sun, 2008-11-09 at 19:05 +0100, Markus Wiederkehr wrote:
>> On Sun, Nov 9, 2008 at 4:51 PM, Oleg Kalnichevski <ol...@apache.org> wrote:
>> > I am very much in favor of upgrading to Java 1.5 and am prepared to do
>> > all the necessary leg work.
>>
>> As luck would have it I have already done the migration (before you
>> wrote this). It includes generics, enhanced for-loops, override and
>> deprecated annotations and an enum for the mode-constants in
>> MessageUtils. If you want to have it I could send the patch to you, to
>> this mailing list or open an issue and post it there. Please decide.
>>
>> Markus
>>
>
> Opening a JIRA and attaching the patch to it would be the best way to go
> about it.

Done.

Two things I have noticed while writing this patch:

* o.a.j.m.u.StringArrayMap is not used anywhere and could probably be deleted.
* some of the source files use tabs for indentation (package
o.a.j.m.field.address)

Markus

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


Re: [mime4j] Java 5?

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sun, 2008-11-09 at 19:05 +0100, Markus Wiederkehr wrote:
> On Sun, Nov 9, 2008 at 4:51 PM, Oleg Kalnichevski <ol...@apache.org> wrote:
> > I am very much in favor of upgrading to Java 1.5 and am prepared to do
> > all the necessary leg work.
> 
> As luck would have it I have already done the migration (before you
> wrote this). It includes generics, enhanced for-loops, override and
> deprecated annotations and an enum for the mode-constants in
> MessageUtils. If you want to have it I could send the patch to you, to
> this mailing list or open an issue and post it there. Please decide.
> 
> Markus
> 

Opening a JIRA and attaching the patch to it would be the best way to go
about it.

Oleg 


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


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


Re: [mime4j] Java 5?

Posted by Markus Wiederkehr <ma...@gmail.com>.
On Sun, Nov 9, 2008 at 4:51 PM, Oleg Kalnichevski <ol...@apache.org> wrote:
> I am very much in favor of upgrading to Java 1.5 and am prepared to do
> all the necessary leg work.

As luck would have it I have already done the migration (before you
wrote this). It includes generics, enhanced for-loops, override and
deprecated annotations and an enum for the mode-constants in
MessageUtils. If you want to have it I could send the patch to you, to
this mailing list or open an issue and post it there. Please decide.

Markus

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


Re: [mime4j] Java 5?

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sun, 2008-11-09 at 11:31 +0000, Robert Burrell Donkin wrote:
> On Sun, Nov 9, 2008 at 11:29 AM, Markus Wiederkehr
> <ma...@gmail.com> wrote:
> > On Sun, Nov 9, 2008 at 12:14 PM, Robert Burrell Donkin
> > <ro...@gmail.com> wrote:
> >> any particular reason why mime4j needs to be switched?
> >
> > Personally I like APIs where I get a List<Field> instead of a dumb
> > List. But aside from these obvious benefits, no.
> 
> yeh - i agree that java 5 APIs are much better
> 
> - robert
> 

I am very much in favor of upgrading to Java 1.5 and am prepared to do
all the necessary leg work. Generics are the main reason why I would
like to see mime4j ported to Java 1.5.

Oleg


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


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


Re: [mime4j] Java 5?

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sun, Nov 9, 2008 at 4:00 PM, Stefano Bagnara <ap...@bago.org> wrote:
> Robert Burrell Donkin ha scritto:
>> On Sun, Nov 9, 2008 at 11:29 AM, Markus Wiederkehr
>> <ma...@gmail.com> wrote:
>>> On Sun, Nov 9, 2008 at 12:14 PM, Robert Burrell Donkin
>>> <ro...@gmail.com> wrote:
>>>> any particular reason why mime4j needs to be switched?
>>> Personally I like APIs where I get a List<Field> instead of a dumb
>>> List. But aside from these obvious benefits, no.
>>
>> yeh - i agree that java 5 APIs are much better
>
> I agree, too.
>
> BTW the only relationship between mime4j jvm requirement and james
> requirements are that james will require at least what mime4j requires.
> Mime4j is a library and may be used in different environment. IMHO we
> would need another poll to mime4j users to understand if they have
> problem with 1.5.

i'm not sure a poll would be effective. library users don't tend to
follow user lists as well as application users. generally, you only
know that users have a problem with a decision after you've taken and
the damage has been done.

> Another option is to use retrotranslator plugin
> (http://mojo.codehaus.org/retrotranslator-maven-plugin/).

this seems like a good solution. this would allow generics to be added
to improve the API but would retain 1.4 support for a while.

- robert

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


Re: [mime4j] Java 5?

Posted by Stefano Bagnara <ap...@bago.org>.
Robert Burrell Donkin ha scritto:
> On Sun, Nov 9, 2008 at 11:29 AM, Markus Wiederkehr
> <ma...@gmail.com> wrote:
>> On Sun, Nov 9, 2008 at 12:14 PM, Robert Burrell Donkin
>> <ro...@gmail.com> wrote:
>>> any particular reason why mime4j needs to be switched?
>> Personally I like APIs where I get a List<Field> instead of a dumb
>> List. But aside from these obvious benefits, no.
> 
> yeh - i agree that java 5 APIs are much better

I agree, too.

BTW the only relationship between mime4j jvm requirement and james
requirements are that james will require at least what mime4j requires.
Mime4j is a library and may be used in different environment. IMHO we
would need another poll to mime4j users to understand if they have
problem with 1.5. Another option is to use retrotranslator plugin
(http://mojo.codehaus.org/retrotranslator-maven-plugin/).

Stefano

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


Re: [mime4j] Java 5?

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sun, Nov 9, 2008 at 11:29 AM, Markus Wiederkehr
<ma...@gmail.com> wrote:
> On Sun, Nov 9, 2008 at 12:14 PM, Robert Burrell Donkin
> <ro...@gmail.com> wrote:
>> any particular reason why mime4j needs to be switched?
>
> Personally I like APIs where I get a List<Field> instead of a dumb
> List. But aside from these obvious benefits, no.

yeh - i agree that java 5 APIs are much better

- robert

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


Re: [mime4j] Java 5?

Posted by Markus Wiederkehr <ma...@gmail.com>.
On Sun, Nov 9, 2008 at 12:14 PM, Robert Burrell Donkin
<ro...@gmail.com> wrote:
> any particular reason why mime4j needs to be switched?

Personally I like APIs where I get a List<Field> instead of a dumb
List. But aside from these obvious benefits, no.

Markus

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


Re: [mime4j] Java 5?

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sun, Nov 9, 2008 at 10:52 AM, Markus Wiederkehr
<ma...@gmail.com> wrote:
> Now that the decision to go for Java 5 seems to be made for jSieve

http://svn.apache.org/repos/asf/james/jsieve/trunk/default.properties still has:

#
# compiler options
# (There should be no need to override default compiler but need to change
# javac task to run without this}

build.compiler = modern
jdk.source = 1.4
jdk.target = 1.4

> and Server,

just the 3.0 code base was upgraded - the 2.x codestream remains java
1.4 compatible

> should Mime4j be upgraded to Java 5, too?

i'm not in favour of unnecessary bumping of version numbers for
libraries: it's annoying for downstream users since it has a cascade
effect

any particular reason why mime4j needs to be switched?

- robert

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