commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: [LANG] 3.0 JCIP Annotations
Date Fri, 20 Mar 2009 01:24:19 GMT
On 20/03/2009, Niall Pemberton <niall.pemberton@gmail.com> wrote:
> On Thu, Mar 19, 2009 at 3:06 PM, Stephen Colebourne
>
> <scolebourne@btopenworld.com> wrote:
>  > sebb wrote:
>  >>
>  >> On 19/03/2009, Stephen Colebourne <scolebourne@btopenworld.com> wrote:
>  >>>
>  >>>  So, overall, I'm dubious as to whether the value is sufficient to
>  >>> compilcate the compliation and to field the inevitable
>  >>> confusion/questions
>  >>> as to 'why we added a dependency' (when we didn't add one really...)
>  >>
>  >> Again, I'm not sure I follow.
>  >>
>  >> I don't see how the addition of a single new dependency complicates
>  >> the compilation.
>  >
>  > Because [lang] has no dependencies at present. That is a feature.
>  >
>  >> Nor do I see why users will be confused, so long as the site shows
>  >> that LANG depends on Java 1.5 only.  Many of them will just use Maven
>  >> to pick up the new version. If necessary one can always add some
>  >> information on the site as to how annotations behave.
>  >
>  > But due to the way maven generates documentation, and the data in the pom,
>  > it will /appear/ like [lang] does have a dependency.
>  >
>  > Since most users are unaware that annotation dependencies are not needed at
>  > runtime, they will take the belt and braces approach and include the
>  > 'dependency'. Or stop using [lang].
>  >
>  >> Indeed hopefully users will start adding annotations to their own code...
>  >
>  > This change doesn't actually help with that, other than providing
>  > advertising for JCIP.
>  >
>  > I'm basically -0 to this change, as I think the confusion outweighs the
>  > gains.
>
>
> I agree with Stephen.
>
>  As well as the point he makes its also causing the
>  net.jcip.annotations package to be included in the OSGi Import-Package
>  statement in the manifest which I assume will make this a required
>  dependency when using lang in an OSGi environment. I guess that the
>  maven-bundle-plugin can probably be configured to stop that happening
>  but even if it can then I don't really see the point of using this
>  over just plain comments in the javadocs.

The point is that the annotations can be checked using automated
tools, so changes that break the contract are detected. Much the same
reason as using generics.

Adding an annotation serves both to document the code and provides a
means to automate checking it. Updating Javadoc is as much work but no
a automated checking benefit.

Seems to me that most of the reasons for not implementing this are
that Maven does not seem handle the compile-time only dependency
properly.

>
>  Niall
>
>
>
>  > Stephen
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>  For additional commands, e-mail: dev-help@commons.apache.org
>
>

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


Mime
View raw message