commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@gmail.com>
Subject Re: [math] Annotations
Date Mon, 10 Feb 2014 17:55:33 GMT
Version 1.0 of jcip as available from Maven central seems to declare the
annotations with runtime retention.  However, it has always been my
understanding that missing annotation types, even for those with runtime
retention, did not cause errors at runtime.  I have just verified this by
creating a simple Maven multimodule project whose main module declares jcip
as a provided dependency and annotates a class, then uses the annotated
class from a JUnit test in another module.  It is as if the annotation was
never declared.

Matt


On Mon, Feb 10, 2014 at 10:53 AM, sebb <sebbaz@gmail.com> wrote:

> On 10 February 2014 09:16, Thomas Neidhart <thomas.neidhart@gmail.com>
> wrote:
> > Hi,
> >
> >
> > Additionally, I would like to introduce also the annotations from the
> jcip (
> > jcip.net). I do not know if we can add them as dependency, but we could
> > also add them ourselves. IMO this would be of great benefit to our users
> if
> > it is clear if a certain class is Immutable, ThreadSafe or Not and one
> does
> > not have to analyze the source code to assert him/herself.
>
> AFAIK the JCIP annotations have runtime retention, which means that
> they need to be available at run-time.
> That would be quite a nuisance.
>
> I did try to get the retention changed to Class file, but failed.
>
> However, a quick search just now shows [1] which have classfile retention.
>
> [1]
> http://code.google.com/p/jsr-305/source/browse/trunk/ri/src/main/java/javax/annotation/concurrent/?r=43
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message