You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gary Gregory <ga...@gmail.com> on 2016/11/26 19:25:34 UTC

[lang] Thread safety annotations

On a [crypto] thread, I mentioned http://pastebin.com/RKPGGdJ9 to add the
"classic" four javax.annotation.concurrent annotations to two packages
(.clazz and .runtime) in Commons Lang for CLASS and RUNTIME retentions.

You'd use the CLASS version to avoid a hard dependency on [lang]. RUNTIME
to keep them around.

We'd use the CLASS versions in all of Commons for documenting thread safety.

Thoughts?

Gary

-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] Thread safety annotations

Posted by Peter Ansell <an...@gmail.com>.
On 28 November 2016 at 10:41, sebb <se...@gmail.com> wrote:
> On 27 November 2016 at 22:31, Gary Gregory <ga...@gmail.com> wrote:
>> It is _because_ they are NOT built-in the language or JRE that we are
>> proposing they belong in [lang].
>>
>> Since we are providing the annotation with CLASS retention only
>> (initially), there is no hard dependency on [lang] at runtime.
>>
>> Is there some subtlety we are missing?
>
> Yes, the compile-time dependency.
>
> AFAIK it's not possible to have a Maven compile-only dependency;
> compile-time implies run-time.

I have a recollection of having used the "optional" dependency feature
for compile time annotations in the past:

https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html

Cheers,

Peter

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


Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
Please see https://issues.apache.org/jira/browse/LANG-1291 and git master
main and unit tests. It's pretty neat that you can only have a compile-time
dependency and not a runtime dependency as the unit tests show.

Gary

On Sun, Nov 27, 2016 at 3:41 PM, sebb <se...@gmail.com> wrote:

> On 27 November 2016 at 22:31, Gary Gregory <ga...@gmail.com> wrote:
> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <se...@gmail.com> wrote:
> >
> >> On 27 November 2016 at 22:03, Gary Gregory <ga...@gmail.com>
> wrote:
> >> > These annotations are the SAME as have been published all over the
> place,
> >> > so I do not think we need a PR for review. Reviewing the code in the
> repo
> >> > should be enough, but I'm not sure _what_ there is to review really.
> I've
> >> > already posted a link to the sources (a pastebin link). I'll create a
> >> Jira
> >> > of course.
> >>
> >> There is one aspect that needs review: does the annotation belong in
> LANG?
> >> If we want to use the annotation in other components, do they have to
> >> depend on LANG?
> >>
> >
> > No see below and previous messages.
> >
> >
> >> If not, do they all have their own copies?
> >>
> >
> > No.
> >
> >
> >>
> >> And what happens when LANG needs a non-BC release?
> >>
> >
> > What is the issue I am missing?
> >
>
> The package name for the annotation might need to change
> That would be a downstream nuisance.
>
> >>
> >> My expectation for such annotations is that they would be
> >> self-contained (or built-in to the languange, not LANG).
> >>
> >
> > It is _because_ they are NOT built-in the language or JRE that we are
> > proposing they belong in [lang].
> >
> > Since we are providing the annotation with CLASS retention only
> > (initially), there is no hard dependency on [lang] at runtime.
> >
> > Is there some subtlety we are missing?
>
> Yes, the compile-time dependency.
>
> AFAIK it's not possible to have a Maven compile-only dependency;
> compile-time implies run-time.
>
> > Gary
> >
> >
> >> > Gary
> >> >
> >> > On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <br...@apache.org>
> >> wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov. 2016
> um
> >> >> 21:01 Uhr:
> >> >>
> >> >> > So let's start with the CLASS retention annotations first. I'll
> commit
> >> >> > later today.
> >> >> >
> >> >>
> >> >> Maybe create a GitHub PR so people can have a look before it goes to
> >> >> master?
> >> >>
> >> >> Benedikt
> >> >>
> >> >>
> >> >> >
> >> >> > Gary
> >> >> >
> >> >> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <bo...@gmail.com> wrote:
> >> >> >
> >> >> > > I feel like documenting thread safety in such a low level, widely
> >> used
> >> >> > > library like [lang] is a great idea. Whether it uses annotations,
> >> >> > javadocs,
> >> >> > > or some sort of informal javadoc comments isn't too big a deal to
> >> me,
> >> >> but
> >> >> > > providing some guarantees of thread safety or lack thereof would
> be
> >> >> > > invaluable information.
> >> >> > >
> >> >> > > On 27 November 2016 at 07:11, Benedikt Ritter <
> britter@apache.org>
> >> >> > wrote:
> >> >> > >
> >> >> > > > I thought we decided to abstain from documenting thread safety
> >> since
> >> >> it
> >> >> > > > would get outdated quickly anyway.
> >> >> > > >
> >> >> > > > Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov.
> >> 2016
> >> >> um
> >> >> > > > 09:11 Uhr:
> >> >> > > >
> >> >> > > > > But if we then want a runtime version we had an odd packaging
> >> with
> >> >> > > CLASS
> >> >> > > > > retention in .concurrent. and RUNTIME in .concurrent.runtime.
> >> >> > > > >
> >> >> > > > > I might be in YAGNI territory here...
> >> >> > > > >
> >> >> > > > > Gary
> >> >> > > > >
> >> >> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <
> boards@gmail.com
> >> >
> >> >> > > wrote:
> >> >> > > > >
> >> >> > > > > > I think adding the additional clazz/runtime package would
> be a
> >> >> > little
> >> >> > > > > > overkill if you only include one packaging option for now.
> >> >> > > > > >
> >> >> > > > > > On 27 November 2016 at 00:04, Gary Gregory <
> >> >> garydgregory@gmail.com
> >> >> > >
> >> >> > > > > wrote:
> >> >> > > > > >
> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <boards@gmail.com
> >
> >> >> wrote:
> >> >> > > > > > > >
> >> >> > > > > > > > I can think of a couple use cases for runtime retention
> >> for
> >> >> > > thread
> >> >> > > > > > safety
> >> >> > > > > > > > annotations, but they're not specific to commons lang.
> >> >> > > > > > > >
> >> >> > > > > > > > 1. A framework could choose what type of data
> structure or
> >> >> > > > algorithm
> >> >> > > > > to
> >> >> > > > > > > use
> >> >> > > > > > > > at runtime based on the presence of which thread safety
> >> >> > > annotation
> >> >> > > > is
> >> >> > > > > > on.
> >> >> > > > > > > > Same for mutability.
> >> >> > > > > > > > 2. A testing framework could use these annotations to
> try
> >> and
> >> >> > > > > automate
> >> >> > > > > > > some
> >> >> > > > > > > > sort of thread safety tests, though that sounds like a
> >> hard
> >> >> > > problem
> >> >> > > > > to
> >> >> > > > > > > > actually implement.
> >> >> > > > > > > >
> >> >> > > > > > > > However, it'd be easier to just start with class
> retention
> >> >> (or
> >> >> > > > source
> >> >> > > > > > > > retention) just for documentation purposes. Higher
> >> retention
> >> >> > > levels
> >> >> > > > > > could
> >> >> > > > > > > > be added later if an important use case came up.
> >> >> > > > > > >
> >> >> > > > > > > But which packaging option?
> >> >> > > > > > >
> >> >> > > > > > > Gary
> >> >> > > > > > > >
> >> >> > > > > > > > On 26 November 2016 at 19:56, Gary Gregory <
> >> >> > > garydgregory@gmail.com
> >> >> > > > >
> >> >> > > > > > > wrote:
> >> >> > > > > > > >
> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <
> sebbaz@gmail.com
> >> >
> >> >> > > wrote:
> >> >> > > > > > > > >
> >> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> >> >> > > > > garydgregory@gmail.com
> >> >> > > > > > >
> >> >> > > > > > > > > wrote:
> >> >> > > > > > > > > > > On a [crypto] thread, I mentioned
> >> >> > > > http://pastebin.com/RKPGGdJ9
> >> >> > > > > > to
> >> >> > > > > > > add
> >> >> > > > > > > > > > the
> >> >> > > > > > > > > > > "classic" four javax.annotation.concurrent
> >> annotations
> >> >> to
> >> >> > > two
> >> >> > > > > > > packages
> >> >> > > > > > > > > > > (.clazz and .runtime) in Commons Lang for CLASS
> and
> >> >> > RUNTIME
> >> >> > > > > > > retentions.
> >> >> > > > > > > > > > >
> >> >> > > > > > > > > > > You'd use the CLASS version to avoid a hard
> >> dependency
> >> >> on
> >> >> > > > > [lang].
> >> >> > > > > > > > > RUNTIME
> >> >> > > > > > > > > > > to keep them around.
> >> >> > > > > > > > > > >
> >> >> > > > > > > > > > > We'd use the CLASS versions in all of Commons for
> >> >> > > documenting
> >> >> > > > > > > thread
> >> >> > > > > > > > > > safety.
> >> >> > > > > > > > > > >
> >> >> > > > > > > > > > > Thoughts?
> >> >> > > > > > > > > >
> >> >> > > > > > > > > > Definitely Class retention, not Runtime.
> >> >> > > > > > > > > > You don't want to have to include the annotation
> jar
> >> on
> >> >> the
> >> >> > > > > runtime
> >> >> > > > > > > > > > classpath.
> >> >> > > > > > > > > >
> >> >> > > > > > > > >
> >> >> > > > > > > > > Hi Sebb,
> >> >> > > > > > > > >
> >> >> > > > > > > > > Right now I have both of these packages:
> >> >> > > > > > > > >
> >> >> > > > > > > > > - org.apache.commons.lang3.
> annotation.concurrent.clazz
> >> >> > > > > > > > > - org.apache.commons.lang3.
> >> annotation.concurrent.runtime
> >> >> > > > > > > > >
> >> >> > > > > > > > > Each with a copy of:
> >> >> > > > > > > > >
> >> >> > > > > > > > > GuardedBy
> >> >> > > > > > > > > Immutable
> >> >> > > > > > > > > NotThreadSafe
> >> >> > > > > > > > > ThreadSafe
> >> >> > > > > > > > >
> >> >> > > > > > > > > Should we include what I have as is?
> >> >> > > > > > > > >
> >> >> > > > > > > > > If we were to only provide the annotation at the
> CLASS
> >> >> > > retention
> >> >> > > > > > level,
> >> >> > > > > > > > > should we still package them in
> >> >> > ...annotation.concurrent.clazz
> >> >> > > in
> >> >> > > > > > case
> >> >> > > > > > > we
> >> >> > > > > > > > > want to provide annotation.concurrent.runtime later?
> >> >> > > > > > > > >
> >> >> > > > > > > > > If we know for certain we never want to provide
> RUNTIME
> >> >> > > > retention,
> >> >> > > > > we
> >> >> > > > > > > can
> >> >> > > > > > > > > put them all in annotation.concurrent now.
> >> >> > > > > > > > >
> >> >> > > > > > > > > Thoughts?
> >> >> > > > > > > > >
> >> >> > > > > > > > > Gary
> >> >> > > > > > > > >
> >> >> > > > > > > > >
> >> >> > > > > > > > >
> >> >> > > > > > > > > > [I don't know why the annotations were ever
> considered
> >> >> > > suitable
> >> >> > > > > for
> >> >> > > > > > > > > > runtime]
> >> >> > > > > > > > > >
> >> >> > > > > > > > > > > Gary
> >> >> > > > > > > > > > >
> >> >> > > > > > > > > > > --
> >> >> > > > > > > > > > > E-Mail: garydgregory@gmail.com |
> >> ggregory@apache.org
> >> >> > > > > > > > > > > Java Persistence with Hibernate, Second Edition
> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> >> >> product/1617290459/ref=as_li_
> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> 9325&creativeASIN=1617290459&
> >> >> > > > > > > > > >
> >> >> > > > > > >
> >> >> > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> cadb800f39946ec62ea2b1af9fe6a2
> >> >> > > b8>
> >> >> > > > > > > > > > >
> >> >> > > > > > > > > > > <http:////
> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> ir?t=garygregory-20&l=am2&o=1&
> >> a=
> >> >> > > > > > > > > > 1617290459>
> >> >> > > > > > > > > > > JUnit in Action, Second Edition
> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> >> >> product/1935182021/ref=as_li_
> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> 9325&creativeASIN=1935182021&
> >> >> > > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> >> >> > > > > > > > > 18%22
> >> >> > > > > > > > > > >
> >> >> > > > > > > > > > >
> >> >> > > > > > > > > > > <http:////
> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> ir?t=garygregory-20&l=am2&o=1&
> >> a=
> >> >> > > > > > > > > > 1935182021>
> >> >> > > > > > > > > > > Spring Batch in Action
> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> >> >> product/1935182951/ref=as_li_
> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> 9325&creativeASIN=1935182951&
> >> >> > > > > > > > > >
> >> >> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >> >> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> >> > > > > > > > > > > <http:////
> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> ir?t=garygregory-20&l=am2&o=1&
> >> a=
> >> >> > > > > > > > > > 1935182951>
> >> >> > > > > > > > > > > Blog: http://garygregory.wordpress.com
> >> >> > > > > > > > > > > Home: http://garygregory.com/
> >> >> > > > > > > > > > > Tweet! http://twitter.com/GaryGregory
> >> >> > > > > > > > > >
> >> >> > > > > > > > > >
> >> >> > ------------------------------------------------------------
> >> >> > > > > > > ---------
> >> >> > > > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.
> >> >> apache.org
> >> >> > > > > > > > > > For additional commands, e-mail:
> >> >> > dev-help@commons.apache.org
> >> >> > > > > > > > > >
> >> >> > > > > > > > > >
> >> >> > > > > > > > >
> >> >> > > > > > > > >
> >> >> > > > > > > > > --
> >> >> > > > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >> >> > > > > > > > > Java Persistence with Hibernate, Second Edition
> >> >> > > > > > > > > <https://www.amazon.com/gp/
> >> product/1617290459/ref=as_li_
> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> 9325&creativeASIN=1617290459&
> >> >> > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> > > > > > cadb800f39946ec62ea2b1af9fe6a2
> >> >> > > > > > > b8>
> >> >> > > > > > > > >
> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> >> >> > > > > > > > > 1617290459>
> >> >> > > > > > > > > JUnit in Action, Second Edition
> >> >> > > > > > > > > <https://www.amazon.com/gp/
> >> product/1935182021/ref=as_li_
> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> 9325&creativeASIN=1935182021&
> >> >> > > > > > > > >
> >> >> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> > > > 31ecd1f6b6d1eaf8886ac902a24de4
> >> >> > > > > > 18%22
> >> >> > > > > > > > > >
> >> >> > > > > > > > >
> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> >> >> > > > > > > > > 1935182021>
> >> >> > > > > > > > > Spring Batch in Action
> >> >> > > > > > > > > <https://www.amazon.com/gp/
> >> product/1935182951/ref=as_li_
> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> 9325&creativeASIN=1935182951&
> >> >> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
> >> >> tag=garygregory-20&linkId=%7B%
> >> >> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> >> >> > > > > > > > > 1935182951>
> >> >> > > > > > > > > Blog: http://garygregory.wordpress.com
> >> >> > > > > > > > > Home: http://garygregory.com/
> >> >> > > > > > > > > Tweet! http://twitter.com/GaryGregory
> >> >> > > > > > > > >
> >> >> > > > > > > >
> >> >> > > > > > > >
> >> >> > > > > > > >
> >> >> > > > > > > > --
> >> >> > > > > > > > Matt Sicker <bo...@gmail.com>
> >> >> > > > > > >
> >> >> > > > > >
> >> >> > > > > >
> >> >> > > > > >
> >> >> > > > > > --
> >> >> > > > > > Matt Sicker <bo...@gmail.com>
> >> >> > > > > >
> >> >> > > > >
> >> >> > > > >
> >> >> > > > >
> >> >> > > > > --
> >> >> > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >> >> > > > > Java Persistence with Hibernate, Second Edition
> >> >> > > > > <
> >> >> > > > > https://www.amazon.com/gp/product/1617290459/ref=as_li_
> >> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> cadb800f39946ec62ea2b1af9fe6a2b8
> >> >> > > > > >
> >> >> > > > >
> >> >> > > > > <http:////
> >> >> > > > >
> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> >> a=1617290459
> >> >> > > >
> >> >> > > > > JUnit in Action, Second Edition
> >> >> > > > > <
> >> >> > > > > https://www.amazon.com/gp/product/1935182021/ref=as_li_
> >> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> 31ecd1f6b6d1eaf8886ac902a24de4
> >> >> > > 18%22
> >> >> > > > > >
> >> >> > > > >
> >> >> > > > > <http:////
> >> >> > > > >
> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> >> a=1935182021
> >> >> > > >
> >> >> > > > > Spring Batch in Action
> >> >> > > > > <
> >> >> > > > > https://www.amazon.com/gp/product/1935182951/ref=as_li_
> >> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> >> >> > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >> >> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> >> >> > > > > >
> >> >> > > > > <http:////
> >> >> > > > >
> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> >> a=1935182951
> >> >> > > >
> >> >> > > > > Blog: http://garygregory.wordpress.com
> >> >> > > > > Home: http://garygregory.com/
> >> >> > > > > Tweet! http://twitter.com/GaryGregory
> >> >> > > > >
> >> >> > > >
> >> >> > >
> >> >> > >
> >> >> > >
> >> >> > > --
> >> >> > > Matt Sicker <bo...@gmail.com>
> >> >> > >
> >> >> >
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >> > Java Persistence with Hibernate, Second Edition
> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> >> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
> b8>
> >> >
> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> >> 1617290459>
> >> > JUnit in Action, Second Edition
> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> >> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> 18%22
> >> >
> >> >
> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> >> 1935182021>
> >> > Spring Batch in Action
> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> >> 1935182951>
> >> > Blog: http://garygregory.wordpress.com
> >> > Home: http://garygregory.com/
> >> > Tweet! http://twitter.com/GaryGregory
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >> For additional commands, e-mail: dev-help@commons.apache.org
> >>
> >>
> >
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > Java Persistence with Hibernate, Second Edition
> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> > JUnit in Action, Second Edition
> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> > Spring Batch in Action
> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
On Sun, Nov 27, 2016 at 3:51 PM, Gary Gregory <ga...@gmail.com>
wrote:

> On Sun, Nov 27, 2016 at 3:41 PM, sebb <se...@gmail.com> wrote:
>
>> On 27 November 2016 at 22:31, Gary Gregory <ga...@gmail.com>
>> wrote:
>> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <se...@gmail.com> wrote:
>> >
>> >> On 27 November 2016 at 22:03, Gary Gregory <ga...@gmail.com>
>> wrote:
>> >> > These annotations are the SAME as have been published all over the
>> place,
>> >> > so I do not think we need a PR for review. Reviewing the code in the
>> repo
>> >> > should be enough, but I'm not sure _what_ there is to review really.
>> I've
>> >> > already posted a link to the sources (a pastebin link). I'll create a
>> >> Jira
>> >> > of course.
>> >>
>> >> There is one aspect that needs review: does the annotation belong in
>> LANG?
>> >> If we want to use the annotation in other components, do they have to
>> >> depend on LANG?
>> >>
>> >
>> > No see below and previous messages.
>> >
>> >
>> >> If not, do they all have their own copies?
>> >>
>> >
>> > No.
>> >
>> >
>> >>
>> >> And what happens when LANG needs a non-BC release?
>> >>
>> >
>> > What is the issue I am missing?
>> >
>>
>> The package name for the annotation might need to change
>> That would be a downstream nuisance.
>>
>
> Hi All,
>
> How is that different than changing the package name for any of our other
> lang types?
>
> If you want move a package, you have to break BC and we have clear
> guidelines for that task.
>
> Since already have a package called org.apache.commons.lang3.concurrent,
> I propose we place these annottaions in org.apache.commons.lang3.
> concurrent.annotation.
>
>
>> >>
>> >> My expectation for such annotations is that they would be
>> >> self-contained (or built-in to the languange, not LANG).
>> >>
>> >
>> > It is _because_ they are NOT built-in the language or JRE that we are
>> > proposing they belong in [lang].
>> >
>> > Since we are providing the annotation with CLASS retention only
>> > (initially), there is no hard dependency on [lang] at runtime.
>> >
>> > Is there some subtlety we are missing?
>>
>> Yes, the compile-time dependency.
>>
>
> No surprise, right? You can't use an annotation without compiling the
> source file.
>
>
>> AFAIK it's not possible to have a Maven compile-only dependency;
>> compile-time implies run-time.
>>
>
> That's a tooling issue of course which should not invalidate the
> worthiness of this feature.
>
> If I am a downstream user of Commons Lang's new annotations, I would need
> a Maven scope that says "I need [lang] as a compile time only dependency" I
> do not see such a scope on https://maven.apache.org/guides/introduction/
> introduction-to-dependency-mechanism.html#Dependency_Scope
>
> Time for a Jira!
>
> I wonder what Gradle offers users in this dept.?
>

This looks promising for Gradle users at least:
https://docs.gradle.org/current/userguide/artifact_dependencies_tutorial.html

Gary


>
> Gary
>
>
>>
>> > Gary
>> >
>> >
>> >> > Gary
>> >> >
>> >> > On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <britter@apache.org
>> >
>> >> wrote:
>> >> >
>> >> >> Hi,
>> >> >>
>> >> >> Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov.
>> 2016 um
>> >> >> 21:01 Uhr:
>> >> >>
>> >> >> > So let's start with the CLASS retention annotations first. I'll
>> commit
>> >> >> > later today.
>> >> >> >
>> >> >>
>> >> >> Maybe create a GitHub PR so people can have a look before it goes to
>> >> >> master?
>> >> >>
>> >> >> Benedikt
>> >> >>
>> >> >>
>> >> >> >
>> >> >> > Gary
>> >> >> >
>> >> >> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <bo...@gmail.com> wrote:
>> >> >> >
>> >> >> > > I feel like documenting thread safety in such a low level,
>> widely
>> >> used
>> >> >> > > library like [lang] is a great idea. Whether it uses
>> annotations,
>> >> >> > javadocs,
>> >> >> > > or some sort of informal javadoc comments isn't too big a deal
>> to
>> >> me,
>> >> >> but
>> >> >> > > providing some guarantees of thread safety or lack thereof
>> would be
>> >> >> > > invaluable information.
>> >> >> > >
>> >> >> > > On 27 November 2016 at 07:11, Benedikt Ritter <
>> britter@apache.org>
>> >> >> > wrote:
>> >> >> > >
>> >> >> > > > I thought we decided to abstain from documenting thread safety
>> >> since
>> >> >> it
>> >> >> > > > would get outdated quickly anyway.
>> >> >> > > >
>> >> >> > > > Gary Gregory <ga...@gmail.com> schrieb am So., 27.
>> Nov.
>> >> 2016
>> >> >> um
>> >> >> > > > 09:11 Uhr:
>> >> >> > > >
>> >> >> > > > > But if we then want a runtime version we had an odd
>> packaging
>> >> with
>> >> >> > > CLASS
>> >> >> > > > > retention in .concurrent. and RUNTIME in
>> .concurrent.runtime.
>> >> >> > > > >
>> >> >> > > > > I might be in YAGNI territory here...
>> >> >> > > > >
>> >> >> > > > > Gary
>> >> >> > > > >
>> >> >> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <
>> boards@gmail.com
>> >> >
>> >> >> > > wrote:
>> >> >> > > > >
>> >> >> > > > > > I think adding the additional clazz/runtime package would
>> be a
>> >> >> > little
>> >> >> > > > > > overkill if you only include one packaging option for now.
>> >> >> > > > > >
>> >> >> > > > > > On 27 November 2016 at 00:04, Gary Gregory <
>> >> >> garydgregory@gmail.com
>> >> >> > >
>> >> >> > > > > wrote:
>> >> >> > > > > >
>> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <
>> boards@gmail.com>
>> >> >> wrote:
>> >> >> > > > > > > >
>> >> >> > > > > > > > I can think of a couple use cases for runtime
>> retention
>> >> for
>> >> >> > > thread
>> >> >> > > > > > safety
>> >> >> > > > > > > > annotations, but they're not specific to commons lang.
>> >> >> > > > > > > >
>> >> >> > > > > > > > 1. A framework could choose what type of data
>> structure or
>> >> >> > > > algorithm
>> >> >> > > > > to
>> >> >> > > > > > > use
>> >> >> > > > > > > > at runtime based on the presence of which thread
>> safety
>> >> >> > > annotation
>> >> >> > > > is
>> >> >> > > > > > on.
>> >> >> > > > > > > > Same for mutability.
>> >> >> > > > > > > > 2. A testing framework could use these annotations to
>> try
>> >> and
>> >> >> > > > > automate
>> >> >> > > > > > > some
>> >> >> > > > > > > > sort of thread safety tests, though that sounds like a
>> >> hard
>> >> >> > > problem
>> >> >> > > > > to
>> >> >> > > > > > > > actually implement.
>> >> >> > > > > > > >
>> >> >> > > > > > > > However, it'd be easier to just start with class
>> retention
>> >> >> (or
>> >> >> > > > source
>> >> >> > > > > > > > retention) just for documentation purposes. Higher
>> >> retention
>> >> >> > > levels
>> >> >> > > > > > could
>> >> >> > > > > > > > be added later if an important use case came up.
>> >> >> > > > > > >
>> >> >> > > > > > > But which packaging option?
>> >> >> > > > > > >
>> >> >> > > > > > > Gary
>> >> >> > > > > > > >
>> >> >> > > > > > > > On 26 November 2016 at 19:56, Gary Gregory <
>> >> >> > > garydgregory@gmail.com
>> >> >> > > > >
>> >> >> > > > > > > wrote:
>> >> >> > > > > > > >
>> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <
>> sebbaz@gmail.com
>> >> >
>> >> >> > > wrote:
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
>> >> >> > > > > garydgregory@gmail.com
>> >> >> > > > > > >
>> >> >> > > > > > > > > wrote:
>> >> >> > > > > > > > > > > On a [crypto] thread, I mentioned
>> >> >> > > > http://pastebin.com/RKPGGdJ9
>> >> >> > > > > > to
>> >> >> > > > > > > add
>> >> >> > > > > > > > > > the
>> >> >> > > > > > > > > > > "classic" four javax.annotation.concurrent
>> >> annotations
>> >> >> to
>> >> >> > > two
>> >> >> > > > > > > packages
>> >> >> > > > > > > > > > > (.clazz and .runtime) in Commons Lang for CLASS
>> and
>> >> >> > RUNTIME
>> >> >> > > > > > > retentions.
>> >> >> > > > > > > > > > >
>> >> >> > > > > > > > > > > You'd use the CLASS version to avoid a hard
>> >> dependency
>> >> >> on
>> >> >> > > > > [lang].
>> >> >> > > > > > > > > RUNTIME
>> >> >> > > > > > > > > > > to keep them around.
>> >> >> > > > > > > > > > >
>> >> >> > > > > > > > > > > We'd use the CLASS versions in all of Commons
>> for
>> >> >> > > documenting
>> >> >> > > > > > > thread
>> >> >> > > > > > > > > > safety.
>> >> >> > > > > > > > > > >
>> >> >> > > > > > > > > > > Thoughts?
>> >> >> > > > > > > > > >
>> >> >> > > > > > > > > > Definitely Class retention, not Runtime.
>> >> >> > > > > > > > > > You don't want to have to include the annotation
>> jar
>> >> on
>> >> >> the
>> >> >> > > > > runtime
>> >> >> > > > > > > > > > classpath.
>> >> >> > > > > > > > > >
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > Hi Sebb,
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > Right now I have both of these packages:
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > - org.apache.commons.lang3.annot
>> ation.concurrent.clazz
>> >> >> > > > > > > > > - org.apache.commons.lang3.
>> >> annotation.concurrent.runtime
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > Each with a copy of:
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > GuardedBy
>> >> >> > > > > > > > > Immutable
>> >> >> > > > > > > > > NotThreadSafe
>> >> >> > > > > > > > > ThreadSafe
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > Should we include what I have as is?
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > If we were to only provide the annotation at the
>> CLASS
>> >> >> > > retention
>> >> >> > > > > > level,
>> >> >> > > > > > > > > should we still package them in
>> >> >> > ...annotation.concurrent.clazz
>> >> >> > > in
>> >> >> > > > > > case
>> >> >> > > > > > > we
>> >> >> > > > > > > > > want to provide annotation.concurrent.runtime later?
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > If we know for certain we never want to provide
>> RUNTIME
>> >> >> > > > retention,
>> >> >> > > > > we
>> >> >> > > > > > > can
>> >> >> > > > > > > > > put them all in annotation.concurrent now.
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > Thoughts?
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > Gary
>> >> >> > > > > > > > >
>> >> >> > > > > > > > >
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > > [I don't know why the annotations were ever
>> considered
>> >> >> > > suitable
>> >> >> > > > > for
>> >> >> > > > > > > > > > runtime]
>> >> >> > > > > > > > > >
>> >> >> > > > > > > > > > > Gary
>> >> >> > > > > > > > > > >
>> >> >> > > > > > > > > > > --
>> >> >> > > > > > > > > > > E-Mail: garydgregory@gmail.com |
>> >> ggregory@apache.org
>> >> >> > > > > > > > > > > Java Persistence with Hibernate, Second Edition
>> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
>> >> >> product/1617290459/ref=as_li_
>> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> 9325&creativeASIN=1617290459&
>> >> >> > > > > > > > > >
>> >> >> > > > > > >
>> >> >> > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> cadb800f39946ec62ea2b1af9fe6a2
>> >> >> > > b8>
>> >> >> > > > > > > > > > >
>> >> >> > > > > > > > > > > <http:////
>> >> >> > > > > > > ir-na.amazon-adsystem.com/e/ir
>> ?t=garygregory-20&l=am2&o=1&
>> >> a=
>> >> >> > > > > > > > > > 1617290459>
>> >> >> > > > > > > > > > > JUnit in Action, Second Edition
>> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
>> >> >> product/1935182021/ref=as_li_
>> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> 9325&creativeASIN=1935182021&
>> >> >> > > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
>> >> >> > > > > > > > > 18%22
>> >> >> > > > > > > > > > >
>> >> >> > > > > > > > > > >
>> >> >> > > > > > > > > > > <http:////
>> >> >> > > > > > > ir-na.amazon-adsystem.com/e/ir
>> ?t=garygregory-20&l=am2&o=1&
>> >> a=
>> >> >> > > > > > > > > > 1935182021>
>> >> >> > > > > > > > > > > Spring Batch in Action
>> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
>> >> >> product/1935182951/ref=as_li_
>> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> 9325&creativeASIN=1935182951&
>> >> >> > > > > > > > > >
>> >> >> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> >> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> >> > > > > > > > > > > <http:////
>> >> >> > > > > > > ir-na.amazon-adsystem.com/e/ir
>> ?t=garygregory-20&l=am2&o=1&
>> >> a=
>> >> >> > > > > > > > > > 1935182951>
>> >> >> > > > > > > > > > > Blog: http://garygregory.wordpress.com
>> >> >> > > > > > > > > > > Home: http://garygregory.com/
>> >> >> > > > > > > > > > > Tweet! http://twitter.com/GaryGregory
>> >> >> > > > > > > > > >
>> >> >> > > > > > > > > >
>> >> >> > ------------------------------------------------------------
>> >> >> > > > > > > ---------
>> >> >> > > > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.
>> >> >> apache.org
>> >> >> > > > > > > > > > For additional commands, e-mail:
>> >> >> > dev-help@commons.apache.org
>> >> >> > > > > > > > > >
>> >> >> > > > > > > > > >
>> >> >> > > > > > > > >
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > --
>> >> >> > > > > > > > > E-Mail: garydgregory@gmail.com |
>> ggregory@apache.org
>> >> >> > > > > > > > > Java Persistence with Hibernate, Second Edition
>> >> >> > > > > > > > > <https://www.amazon.com/gp/
>> >> product/1617290459/ref=as_li_
>> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> 9325&creativeASIN=1617290459&
>> >> >> > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> > > > > > cadb800f39946ec62ea2b1af9fe6a2
>> >> >> > > > > > > b8>
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> >> > > > > > garygregory-20&l=am2&o=1&a=
>> >> >> > > > > > > > > 1617290459>
>> >> >> > > > > > > > > JUnit in Action, Second Edition
>> >> >> > > > > > > > > <https://www.amazon.com/gp/
>> >> product/1935182021/ref=as_li_
>> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> 9325&creativeASIN=1935182021&
>> >> >> > > > > > > > >
>> >> >> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> > > > 31ecd1f6b6d1eaf8886ac902a24de4
>> >> >> > > > > > 18%22
>> >> >> > > > > > > > > >
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> >> > > > > > garygregory-20&l=am2&o=1&a=
>> >> >> > > > > > > > > 1935182021>
>> >> >> > > > > > > > > Spring Batch in Action
>> >> >> > > > > > > > > <https://www.amazon.com/gp/
>> >> product/1935182951/ref=as_li_
>> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> 9325&creativeASIN=1935182951&
>> >> >> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
>> >> >> tag=garygregory-20&linkId=%7B%
>> >> >> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> >> > > > > > garygregory-20&l=am2&o=1&a=
>> >> >> > > > > > > > > 1935182951>
>> >> >> > > > > > > > > Blog: http://garygregory.wordpress.com
>> >> >> > > > > > > > > Home: http://garygregory.com/
>> >> >> > > > > > > > > Tweet! http://twitter.com/GaryGregory
>> >> >> > > > > > > > >
>> >> >> > > > > > > >
>> >> >> > > > > > > >
>> >> >> > > > > > > >
>> >> >> > > > > > > > --
>> >> >> > > > > > > > Matt Sicker <bo...@gmail.com>
>> >> >> > > > > > >
>> >> >> > > > > >
>> >> >> > > > > >
>> >> >> > > > > >
>> >> >> > > > > > --
>> >> >> > > > > > Matt Sicker <bo...@gmail.com>
>> >> >> > > > > >
>> >> >> > > > >
>> >> >> > > > >
>> >> >> > > > >
>> >> >> > > > > --
>> >> >> > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> >> >> > > > > Java Persistence with Hibernate, Second Edition
>> >> >> > > > > <
>> >> >> > > > > https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> >> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> cadb800f39946ec62ea2b1af9fe6a2b8
>> >> >> > > > > >
>> >> >> > > > >
>> >> >> > > > > <http:////
>> >> >> > > > >
>> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> >> a=1617290459
>> >> >> > > >
>> >> >> > > > > JUnit in Action, Second Edition
>> >> >> > > > > <
>> >> >> > > > > https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> >> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> 31ecd1f6b6d1eaf8886ac902a24de4
>> >> >> > > 18%22
>> >> >> > > > > >
>> >> >> > > > >
>> >> >> > > > > <http:////
>> >> >> > > > >
>> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> >> a=1935182021
>> >> >> > > >
>> >> >> > > > > Spring Batch in Action
>> >> >> > > > > <
>> >> >> > > > > https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> >> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> >> >> > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> >> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
>> >> >> > > > > >
>> >> >> > > > > <http:////
>> >> >> > > > >
>> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> >> a=1935182951
>> >> >> > > >
>> >> >> > > > > Blog: http://garygregory.wordpress.com
>> >> >> > > > > Home: http://garygregory.com/
>> >> >> > > > > Tweet! http://twitter.com/GaryGregory
>> >> >> > > > >
>> >> >> > > >
>> >> >> > >
>> >> >> > >
>> >> >> > >
>> >> >> > > --
>> >> >> > > Matt Sicker <bo...@gmail.com>
>> >> >> > >
>> >> >> >
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> >> > Java Persistence with Hibernate, Second Edition
>> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> >> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b
>> 1af9fe6a2b8>
>> >> >
>> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=
>> am2&o=1&a=
>> >> 1617290459>
>> >> > JUnit in Action, Second Edition
>> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> >> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac
>> 902a24de418%22
>> >> >
>> >> >
>> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=
>> am2&o=1&a=
>> >> 1935182021>
>> >> > Spring Batch in Action
>> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=
>> am2&o=1&a=
>> >> 1935182951>
>> >> > Blog: http://garygregory.wordpress.com
>> >> > Home: http://garygregory.com/
>> >> > Tweet! http://twitter.com/GaryGregory
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> >> For additional commands, e-mail: dev-help@commons.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > Java Persistence with Hibernate, Second Edition
>> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?
>> ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&link
>> Code=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>> >
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=
>> am2&o=1&a=1617290459>
>> > JUnit in Action, Second Edition
>> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?
>> ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&link
>> Code=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>
>> >
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=
>> am2&o=1&a=1935182021>
>> > Spring Batch in Action
>> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?
>> ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&link
>> Code=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Bli
>> nk_id%7D%7D%22%3ESpring+Batch+in+Action>
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=
>> am2&o=1&a=1935182951>
>> > Blog: http://garygregory.wordpress.com
>> > Home: http://garygregory.com/
>> > Tweet! http://twitter.com/GaryGregory
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] Thread safety annotations

Posted by Peter Ansell <an...@gmail.com>.
On 28 November 2016 at 10:51, Gary Gregory <ga...@gmail.com> wrote:
> On Sun, Nov 27, 2016 at 3:41 PM, sebb <se...@gmail.com> wrote:
>
>> On 27 November 2016 at 22:31, Gary Gregory <ga...@gmail.com> wrote:
>> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <se...@gmail.com> wrote:
>> >
>> >> On 27 November 2016 at 22:03, Gary Gregory <ga...@gmail.com>
>> wrote:
>> >> > These annotations are the SAME as have been published all over the
>> place,
>> >> > so I do not think we need a PR for review. Reviewing the code in the
>> repo
>> >> > should be enough, but I'm not sure _what_ there is to review really.
>> I've
>> >> > already posted a link to the sources (a pastebin link). I'll create a
>> >> Jira
>> >> > of course.
>> >>
>> >> There is one aspect that needs review: does the annotation belong in
>> LANG?
>> >> If we want to use the annotation in other components, do they have to
>> >> depend on LANG?
>> >>
>> >
>> > No see below and previous messages.
>> >
>> >
>> >> If not, do they all have their own copies?
>> >>
>> >
>> > No.
>> >
>> >
>> >>
>> >> And what happens when LANG needs a non-BC release?
>> >>
>> >
>> > What is the issue I am missing?
>> >
>>
>> The package name for the annotation might need to change
>> That would be a downstream nuisance.
>>
>
> Hi All,
>
> How is that different than changing the package name for any of our other
> lang types?
>
> If you want move a package, you have to break BC and we have clear
> guidelines for that task.
>
> Since already have a package called org.apache.commons.lang3.concurrent, I
> propose we place these annottaions in
> org.apache.commons.lang3.concurrent.annotation.
>
>
>> >>
>> >> My expectation for such annotations is that they would be
>> >> self-contained (or built-in to the languange, not LANG).
>> >>
>> >
>> > It is _because_ they are NOT built-in the language or JRE that we are
>> > proposing they belong in [lang].
>> >
>> > Since we are providing the annotation with CLASS retention only
>> > (initially), there is no hard dependency on [lang] at runtime.
>> >
>> > Is there some subtlety we are missing?
>>
>> Yes, the compile-time dependency.
>>
>
> No surprise, right? You can't use an annotation without compiling the
> source file.
>
>
>> AFAIK it's not possible to have a Maven compile-only dependency;
>> compile-time implies run-time.
>>
>
> That's a tooling issue of course which should not invalidate the worthiness
> of this feature.
>
> If I am a downstream user of Commons Lang's new annotations, I would need a
> Maven scope that says "I need [lang] as a compile time only dependency" I
> do not see such a scope on
> https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope

It isn't defined as a scope, but the "optional" flag, when combined
with the "compile" scope is described on that page as:

 "It may be helpful to think of optional dependencies as "excluded by default."

That will remove lang from the default list of dependencies if a user
specifies optional=true.

My previous experience with optional=true is from the
META-INF/services generator created by Kohsuke Kawaguchi, which worked
for me to not inherit the generator in dependent modules:

http://metainf-services.kohsuke.org/

Cheers,

Peter

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


Re: [lang] Thread safety annotations

Posted by Matt Sicker <bo...@gmail.com>.
Oh that's a pretty decent advantage there actually.

On 29 November 2016 at 22:07, Gary Gregory <ga...@gmail.com> wrote:

> On Tue, Nov 29, 2016 at 8:04 PM, Matt Sicker <bo...@gmail.com> wrote:
>
> > That's pretty neat. So it looks like two competing styles of annotations
> > here would be separate annotations for each concern, a single annotation
> > with an enum, or even separate annotations with boolean values or enums
> > (though that gets a little more complex come to think of it).
> >
>
> The problem with solo annotations is that you can say nonsensical things
> like:
>
> @ThreadSafe
> @NotThreadSafe
> public class Foo {
> ...
> }
>
> You can't do that with:
>
> @Contract(threading = ThreadingBehavior.IMMUTABLE)
>
> Gary
>
>
> >
> > If only the JDK had an annotation for this.
> >
> > On 29 November 2016 at 20:41, Gary Gregory <ga...@gmail.com>
> wrote:
> >
> > > And an example:
> > >
> > > /**
> > >  * HTTP/2 compatible extension of {@link RequestConnControl}.
> > >  *
> > >  * @since 5.0
> > >  */
> > > @Contract(threading = ThreadingBehavior.IMMUTABLE)
> > > public class H2RequestConnControl extends RequestConnControl {
> > > ...
> > >
> > > Gary
> > >
> > > On Tue, Nov 29, 2016 at 6:40 PM, Gary Gregory <ga...@gmail.com>
> > > wrote:
> > >
> > > > FYI, this is how we're going to do it in HttpComponents 5:
> > > > https://svn.apache.org/repos/asf/httpcomponents/
> > > > httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/
> > > > annotation/ThreadingBehavior.java
> > > >
> > > > Gary
> > > >
> > > > On Tue, Nov 29, 2016 at 2:20 PM, Gary Gregory <
> garydgregory@gmail.com>
> > > > wrote:
> > > >
> > > >> On Tue, Nov 29, 2016 at 1:59 PM, Benedikt Ritter <
> britter@apache.org>
> > > >> wrote:
> > > >>
> > > >>> I agree with Oliver. I don't think we have consensus about if and
> how
> > > we
> > > >>> want to implement this. Does it even make sense to try to document
> > > this?
> > > >>> What value does such a documentation have, when it is wrong 50% of
> > the
> > > >>> time? I just sumed up the feedback I got from one (!) user at the
> > > >>> conference. I think this needs more thought. This is why I
> suggested
> > to
> > > >>> create a PR instead of committing this directly to master.
> > > >>>
> > > >>
> > > >> This is a good discussion. Let's keep in mind the audience for these
> > new
> > > >> annotations:
> > > >>
> > > >> - Commons Lang
> > > >> - All of Commons
> > > >> - Any Java code.
> > > >>
> > > >> Just because we may not get to document thread safety properly in
> > > Commons
> > > >> Lang does not mean that any other developers will fail similarly.
> > > >>
> > > >> My goal is not to decorate all of Commons Lang with these new
> > > annotations
> > > >> and certainly not to take on the task of documenting all of Commons
> > ;-)
> > > >>
> > > >> I look at these annotations as a tool, a Commons way of using
> > > annotations
> > > >> where some folks best see fit.
> > > >>
> > > >> Providing these annotations is one thing, using them another ;-)
> > > >>
> > > >> Gary
> > > >>
> > > >>
> > > >>>
> > > >>> Regards.
> > > >>> Benedikt
> > > >>>
> > > >>> Gary Gregory <ga...@gmail.com> schrieb am Di. 29. Nov. 2016
> > um
> > > >>> 22:33:
> > > >>>
> > > >>> > On Tue, Nov 29, 2016 at 1:12 PM, Oliver Heger <
> > > >>> > oliver.heger@oliver-heger.de>
> > > >>> > wrote:
> > > >>> >
> > > >>> > >
> > > >>> > >
> > > >>> > > Am 28.11.2016 um 22:28 schrieb Gary Gregory:
> > > >>> > > > WRT licensing, I re-implemented the annotations in git
> master.
> > > >>> Notice
> > > >>> > > that
> > > >>> > > > all Javadocs are different and much simpler for now. Feel
> free
> > to
> > > >>> write
> > > >>> > > > more.
> > > >>> > >
> > > >>> > > As the length of this thread shows, using annotations for the
> > > >>> purpose of
> > > >>> > > documenting thread-safety can be a controversial topic.
> > > >>> > >
> > > >>> >
> > > >>> > How is the length of a thread a reflection of its controversy?
> > > >>> >
> > > >>> >
> > > >>> > > I do not see the advantage over a plain text documentation in
> > > >>> Javadoc.
> > > >>> > > Written text can even be more comprehensive.
> > > >>> > >
> > > >>> >
> > > >>> > One does not exclude the other. Annotations are easy to search.
> > Text
> > > in
> > > >>> > Javadoc is subject to typos and formatting oddities that makes it
> > > much
> > > >>> > harder to search.
> > > >>> >
> > > >>> > Tools can work with annotations.
> > > >>> >
> > > >>> >
> > > >>> > >
> > > >>> > > The risk that the documentation goes out of sync with the
> > > >>> implementation
> > > >>> > > is given in both scenarios. But if a class announced as
> > thread-safe
> > > >>> is
> > > >>> > > manipulated in a way that it is no longer thread-safe, I would
> > > >>> consider
> > > >>> > > this as a bug. This is also a kind of backwards-incompatible
> > > change.
> > > >>> > >
> > > >>> >
> > > >>> > That has nothing to do with annotations. If we change behavior in
> > > some
> > > >>> > incompatible way, that's the bug.
> > > >>> >
> > > >>> > I can interpret what you wrote as: If I remove an @Override
> > > annotation,
> > > >>> > then that is backwards-incompatible change. That sounds extreme.
> > > >>> >
> > > >>> > I do not think we have talked about annotations in the context of
> > > >>> backwards
> > > >>> > compatibility. Does this deserve a separate discussion?
> > > >>> >
> > > >>> > a third penny,
> > > >>> > Gary
> > > >>> >
> > > >>> >
> > > >>> > >
> > > >>> > > My 2 cents
> > > >>> > > Oliver
> > > >>> > >
> > > >>> > > >
> > > >>> > > > Gary
> > > >>> > > >
> > > >>> > > > On Mon, Nov 28, 2016 at 12:55 PM, Gary Gregory <
> > > >>> garydgregory@gmail.com
> > > >>> > >
> > > >>> > > > wrote:
> > > >>> > > >
> > > >>> > > >> On Mon, Nov 28, 2016 at 12:18 PM, Matt Benson <
> > > >>> gudnabrsam@gmail.com>
> > > >>> > > >> wrote:
> > > >>> > > >>
> > > >>> > > >>> I hoped to stay out of this. :) Points:
> > > >>> > > >>>
> > > >>> > > >>> * "provided" scope is another Maven mechanism that compiles
> > > >>> against a
> > > >>> > > >>> given dependency but does not pull the dependency in as a
> > > runtime
> > > >>> > > >>> dependency. I personally prefer it to marking a dependency
> > > >>> optional.
> > > >>> > > >>> * For annotations with only classfile retention, a future
> > > package
> > > >>> > > >>> rename e.g. lang4 would not require a consumer to upgrade
> > just
> > > >>> for
> > > >>> > the
> > > >>> > > >>> renamed annotation, though nothing would stop them from
> doing
> > > >>> so. A
> > > >>> > > >>> given project could depend on either or both of lang3 and
> > lang4
> > > >>> in
> > > >>> > any
> > > >>> > > >>> combination of compile-only or runtime-inclusive scope with
> > no
> > > >>> > > >>> problems.
> > > >>> > > >>> * A standalone annotations component might be interesting,
> > but
> > > >>> I'm
> > > >>> > not
> > > >>> > > >>> sure if the proposed annotations constitute a critical mass
> > > >>> adequate
> > > >>> > > >>> to justify it.
> > > >>> > > >>>
> > > >>> > > >>
> > > >>> > > >> I would have a hard time justifying a
> > commons-lang3-annotations
> > > >>> module
> > > >>> > > >> with only these 4 annotations.
> > > >>> > > >>
> > > >>> > > >> I could see having a Commons Annotations component though
> > which
> > > >>> for
> > > >>> > good
> > > >>> > > >> or bad would hold all annotations one could imagine having
> the
> > > >>> Commons
> > > >>> > > >> world. Hm... it smells a bit though...
> > > >>> > > >>
> > > >>> > > >> Gary
> > > >>> > > >>
> > > >>> > > >>
> > > >>> > > >>>
> > > >>> > > >>> Matt
> > > >>> > > >>>
> > > >>> > > >>> On Mon, Nov 28, 2016 at 1:21 PM, Pascal Schumacher
> > > >>> > > >>> <pa...@gmx.net> wrote:
> > > >>> > > >>>> Groovy had to change the license of its documentation from
> > > CC-A
> > > >>> 3.0
> > > >>> > to
> > > >>> > > >>> the
> > > >>> > > >>>> Apache License during incubation:
> > > >>> > > >>>>
> > > >>> > > >>>> https://issues.apache.org/jira/browse/LEGAL-167
> > > >>> > > >>>> http://markmail.org/message/2e7tehlwtpx625q4
> > > >>> > > >>>> https://issues.apache.org/jira/browse/GROOVY-7470
> > > >>> > > >>>>
> > > >>> > > >>>> So I guess Commons is probably not allowed to use these
> > files.
> > > >>> > > >>>>
> > > >>> > > >>>>
> > > >>> > > >>>> Am 28.11.2016 um 18:58 schrieb Gary Gregory:
> > > >>> > > >>>>>
> > > >>> > > >>>>> On Mon, Nov 28, 2016 at 7:15 AM, Jochen Wiedmann
> > > >>> > > >>>>> <jo...@gmail.com>
> > > >>> > > >>>>> wrote:
> > > >>> > > >>>>>
> > > >>> > > >>>>>> On Mon, Nov 28, 2016 at 4:06 PM, sebb <sebbaz@gmail.com
> >
> > > >>> wrote:
> > > >>> > > >>>>>>
> > > >>> > > >>>>>>> The code would not run without the JCIP jar.
> > > >>> > > >>>>>>
> > > >>> > > >>>>>> Are there licensing issues regarding that jar?
> > > >>> > > >>>>>>
> > > >>> > > >>>>> Hm, according to https://www.apache.org/legal/
> > resolved.html,
> > > >>> the
> > > >>> > > >>> license
> > > >>> > > >>>>> "Creative Commons Attribution (CC-A) 2.5" is discussed in
> > the
> > > >>> > section
> > > >>> > > >>> "HOW
> > > >>> > > >>>>> SHOULD "WEAK COPYLEFT" LICENSES BE HANDLED?"
> > > >>> > > >>>>>
> > > >>> > > >>>>> It looks like we might have an issue but this is not
> clear
> > to
> > > >>> me as
> > > >>> > > >>> IANAL.
> > > >>> > > >>>>> I you look at the license summary
> > > >>> > > >>>>> https://creativecommons.org/licenses/by/2.5/ it sure
> seems
> > > >>> OK, but
> > > >>> > > our
> > > >>> > > >>>>> resolved.html has this license on a list of licenses to
> > watch
> > > >>> out
> > > >>> > > for.
> > > >>> > > >>>>>
> > > >>> > > >>>>> So to be on the safe side, how do we best re-implement
> > these?
> > > >>> The
> > > >>> > > >>>>> annotation names we can keep as is but I would imagine
> that
> > > >>> we'd
> > > >>> > want
> > > >>> > > >>> to
> > > >>> > > >>>>> re-write the Javadoc from scratch.
> > > >>> > > >>>>>
> > > >>> > > >>>>> Thoughts?
> > > >>> > > >>>>>
> > > >>> > > >>>>> Gary
> > > >>> > > >>>>>
> > > >>> > > >>>>>
> > > >>> > > >>>>>> Jochen
> > > >>> > > >>>>>>
> > > >>> > > >>>>>>
> > > >>> > > >>>>>> --
> > > >>> > > >>>>>> The next time you hear: "Don't reinvent the wheel!"
> > > >>> > > >>>>>>
> > > >>> > > >>>>>> http://www.keystonedevelopment.co.uk/wp-
> > > content/uploads/2014
> > > >>> /10/
> > > >>> > > >>>>>> evolution-of-the-wheel-300x85.jpg
> > > >>> > > >>>>>>
> > > >>> > > >>>>>> ------------------------------
> > > ------------------------------
> > > >>> > > ---------
> > > >>> > > >>>>>> 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
> > > >>> > > >>>>
> > > >>> > > >>>
> > > >>> > > >>> ------------------------------
> ------------------------------
> > > >>> ---------
> > > >>> > > >>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > >>> > > >>> For additional commands, e-mail:
> dev-help@commons.apache.org
> > > >>> > > >>>
> > > >>> > > >>>
> > > >>> > > >>
> > > >>> > > >>
> > > >>> > > >> --
> > > >>> > > >> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > >>> > > >> Java Persistence with Hibernate, Second Edition
> > > >>> > > >> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > >>> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > >>> > > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b
> > > >>> 1af9fe6a2b8>
> > > >>> > > >>
> > > >>> > > >> <http:////
> > > >>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > >>> > > 1617290459>
> > > >>> > > >> JUnit in Action, Second Edition
> > > >>> > > >> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > >>> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > >>> > >
> > > >>> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac
> > > >>> 902a24de418%22
> > > >>> > > >
> > > >>> > > >>
> > > >>> > > >> <http:////
> > > >>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > >>> > > 1935182021>
> > > >>> > > >> Spring Batch in Action
> > > >>> > > >> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > >>> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > >>> > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > >>> > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > >>> > > >> <http:////
> > > >>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > >>> > > 1935182951>
> > > >>> > > >> Blog: http://garygregory.wordpress.com
> > > >>> > > >> Home: http://garygregory.com/
> > > >>> > > >> Tweet! http://twitter.com/GaryGregory
> > > >>> > > >>
> > > >>> > > >
> > > >>> > > >
> > > >>> > > >
> > > >>> > >
> > > >>> > > ------------------------------------------------------------
> > > >>> ---------
> > > >>> > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > >>> > > For additional commands, e-mail: dev-help@commons.apache.org
> > > >>> > >
> > > >>> > >
> > > >>> >
> > > >>> >
> > > >>> > --
> > > >>> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > >>> > Java Persistence with Hibernate, Second Edition
> > > >>> > <
> > > >>> > https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie
> > > >>> =UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCo
> > > >>> de=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8
> > > >>> > >
> > > >>> >
> > > >>> > <http:////
> > > >>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> > > a=1617290459
> > > >>> >
> > > >>> > JUnit in Action, Second Edition
> > > >>> > <
> > > >>> > https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie
> > > >>> =UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCo
> > > >>> de=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> 18%22
> > > >>> > >
> > > >>> >
> > > >>> > <http:////
> > > >>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> > > a=1935182021
> > > >>> >
> > > >>> > Spring Batch in Action
> > > >>> > <
> > > >>> > https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie
> > > >>> =UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCo
> > > >>> de=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink
> > > >>> _id%7D%7D%22%3ESpring+Batch+in+Action
> > > >>> > >
> > > >>> > <http:////
> > > >>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> > > a=1935182951
> > > >>> >
> > > >>> > Blog: http://garygregory.wordpress.com
> > > >>> > Home: http://garygregory.com/
> > > >>> > Tweet! http://twitter.com/GaryGregory
> > > >>> >
> > > >>>
> > > >>
> > > >>
> > > >>
> > > >> --
> > > >> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > >> Java Persistence with Hibernate, Second Edition
> > > >> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
> b8>
> > > >>
> > > >> <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > garygregory-20&l=am2&o=1&a=
> > > 1617290459>
> > > >> JUnit in Action, Second Edition
> > > >> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> > 18%22
> > > >
> > > >>
> > > >> <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > garygregory-20&l=am2&o=1&a=
> > > 1935182021>
> > > >> Spring Batch in Action
> > > >> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > >> <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > garygregory-20&l=am2&o=1&a=
> > > 1935182951>
> > > >> Blog: http://garygregory.wordpress.com
> > > >> Home: http://garygregory.com/
> > > >> Tweet! http://twitter.com/GaryGregory
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > Java Persistence with Hibernate, Second Edition
> > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
> b8>
> > > >
> > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> > > 1617290459>
> > > > JUnit in Action, Second Edition
> > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> > 18%22
> > > >
> > > >
> > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> > > 1935182021>
> > > > Spring Batch in Action
> > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> > > 1935182951>
> > > > Blog: http://garygregory.wordpress.com
> > > > Home: http://garygregory.com/
> > > > Tweet! http://twitter.com/GaryGregory
> > > >
> > >
> > >
> > >
> > > --
> > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > Java Persistence with Hibernate, Second Edition
> > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
> b8>
> > >
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > 1617290459>
> > > JUnit in Action, Second Edition
> > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> > 18%22
> > > >
> > >
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > 1935182021>
> > > Spring Batch in Action
> > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > 1935182951>
> > > Blog: http://garygregory.wordpress.com
> > > Home: http://garygregory.com/
> > > Tweet! http://twitter.com/GaryGregory
> > >
> >
> >
> >
> > --
> > Matt Sicker <bo...@gmail.com>
> >
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
Matt Sicker <bo...@gmail.com>

Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
On Tue, Nov 29, 2016 at 8:04 PM, Matt Sicker <bo...@gmail.com> wrote:

> That's pretty neat. So it looks like two competing styles of annotations
> here would be separate annotations for each concern, a single annotation
> with an enum, or even separate annotations with boolean values or enums
> (though that gets a little more complex come to think of it).
>

The problem with solo annotations is that you can say nonsensical things
like:

@ThreadSafe
@NotThreadSafe
public class Foo {
...
}

You can't do that with:

@Contract(threading = ThreadingBehavior.IMMUTABLE)

Gary


>
> If only the JDK had an annotation for this.
>
> On 29 November 2016 at 20:41, Gary Gregory <ga...@gmail.com> wrote:
>
> > And an example:
> >
> > /**
> >  * HTTP/2 compatible extension of {@link RequestConnControl}.
> >  *
> >  * @since 5.0
> >  */
> > @Contract(threading = ThreadingBehavior.IMMUTABLE)
> > public class H2RequestConnControl extends RequestConnControl {
> > ...
> >
> > Gary
> >
> > On Tue, Nov 29, 2016 at 6:40 PM, Gary Gregory <ga...@gmail.com>
> > wrote:
> >
> > > FYI, this is how we're going to do it in HttpComponents 5:
> > > https://svn.apache.org/repos/asf/httpcomponents/
> > > httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/
> > > annotation/ThreadingBehavior.java
> > >
> > > Gary
> > >
> > > On Tue, Nov 29, 2016 at 2:20 PM, Gary Gregory <ga...@gmail.com>
> > > wrote:
> > >
> > >> On Tue, Nov 29, 2016 at 1:59 PM, Benedikt Ritter <br...@apache.org>
> > >> wrote:
> > >>
> > >>> I agree with Oliver. I don't think we have consensus about if and how
> > we
> > >>> want to implement this. Does it even make sense to try to document
> > this?
> > >>> What value does such a documentation have, when it is wrong 50% of
> the
> > >>> time? I just sumed up the feedback I got from one (!) user at the
> > >>> conference. I think this needs more thought. This is why I suggested
> to
> > >>> create a PR instead of committing this directly to master.
> > >>>
> > >>
> > >> This is a good discussion. Let's keep in mind the audience for these
> new
> > >> annotations:
> > >>
> > >> - Commons Lang
> > >> - All of Commons
> > >> - Any Java code.
> > >>
> > >> Just because we may not get to document thread safety properly in
> > Commons
> > >> Lang does not mean that any other developers will fail similarly.
> > >>
> > >> My goal is not to decorate all of Commons Lang with these new
> > annotations
> > >> and certainly not to take on the task of documenting all of Commons
> ;-)
> > >>
> > >> I look at these annotations as a tool, a Commons way of using
> > annotations
> > >> where some folks best see fit.
> > >>
> > >> Providing these annotations is one thing, using them another ;-)
> > >>
> > >> Gary
> > >>
> > >>
> > >>>
> > >>> Regards.
> > >>> Benedikt
> > >>>
> > >>> Gary Gregory <ga...@gmail.com> schrieb am Di. 29. Nov. 2016
> um
> > >>> 22:33:
> > >>>
> > >>> > On Tue, Nov 29, 2016 at 1:12 PM, Oliver Heger <
> > >>> > oliver.heger@oliver-heger.de>
> > >>> > wrote:
> > >>> >
> > >>> > >
> > >>> > >
> > >>> > > Am 28.11.2016 um 22:28 schrieb Gary Gregory:
> > >>> > > > WRT licensing, I re-implemented the annotations in git master.
> > >>> Notice
> > >>> > > that
> > >>> > > > all Javadocs are different and much simpler for now. Feel free
> to
> > >>> write
> > >>> > > > more.
> > >>> > >
> > >>> > > As the length of this thread shows, using annotations for the
> > >>> purpose of
> > >>> > > documenting thread-safety can be a controversial topic.
> > >>> > >
> > >>> >
> > >>> > How is the length of a thread a reflection of its controversy?
> > >>> >
> > >>> >
> > >>> > > I do not see the advantage over a plain text documentation in
> > >>> Javadoc.
> > >>> > > Written text can even be more comprehensive.
> > >>> > >
> > >>> >
> > >>> > One does not exclude the other. Annotations are easy to search.
> Text
> > in
> > >>> > Javadoc is subject to typos and formatting oddities that makes it
> > much
> > >>> > harder to search.
> > >>> >
> > >>> > Tools can work with annotations.
> > >>> >
> > >>> >
> > >>> > >
> > >>> > > The risk that the documentation goes out of sync with the
> > >>> implementation
> > >>> > > is given in both scenarios. But if a class announced as
> thread-safe
> > >>> is
> > >>> > > manipulated in a way that it is no longer thread-safe, I would
> > >>> consider
> > >>> > > this as a bug. This is also a kind of backwards-incompatible
> > change.
> > >>> > >
> > >>> >
> > >>> > That has nothing to do with annotations. If we change behavior in
> > some
> > >>> > incompatible way, that's the bug.
> > >>> >
> > >>> > I can interpret what you wrote as: If I remove an @Override
> > annotation,
> > >>> > then that is backwards-incompatible change. That sounds extreme.
> > >>> >
> > >>> > I do not think we have talked about annotations in the context of
> > >>> backwards
> > >>> > compatibility. Does this deserve a separate discussion?
> > >>> >
> > >>> > a third penny,
> > >>> > Gary
> > >>> >
> > >>> >
> > >>> > >
> > >>> > > My 2 cents
> > >>> > > Oliver
> > >>> > >
> > >>> > > >
> > >>> > > > Gary
> > >>> > > >
> > >>> > > > On Mon, Nov 28, 2016 at 12:55 PM, Gary Gregory <
> > >>> garydgregory@gmail.com
> > >>> > >
> > >>> > > > wrote:
> > >>> > > >
> > >>> > > >> On Mon, Nov 28, 2016 at 12:18 PM, Matt Benson <
> > >>> gudnabrsam@gmail.com>
> > >>> > > >> wrote:
> > >>> > > >>
> > >>> > > >>> I hoped to stay out of this. :) Points:
> > >>> > > >>>
> > >>> > > >>> * "provided" scope is another Maven mechanism that compiles
> > >>> against a
> > >>> > > >>> given dependency but does not pull the dependency in as a
> > runtime
> > >>> > > >>> dependency. I personally prefer it to marking a dependency
> > >>> optional.
> > >>> > > >>> * For annotations with only classfile retention, a future
> > package
> > >>> > > >>> rename e.g. lang4 would not require a consumer to upgrade
> just
> > >>> for
> > >>> > the
> > >>> > > >>> renamed annotation, though nothing would stop them from doing
> > >>> so. A
> > >>> > > >>> given project could depend on either or both of lang3 and
> lang4
> > >>> in
> > >>> > any
> > >>> > > >>> combination of compile-only or runtime-inclusive scope with
> no
> > >>> > > >>> problems.
> > >>> > > >>> * A standalone annotations component might be interesting,
> but
> > >>> I'm
> > >>> > not
> > >>> > > >>> sure if the proposed annotations constitute a critical mass
> > >>> adequate
> > >>> > > >>> to justify it.
> > >>> > > >>>
> > >>> > > >>
> > >>> > > >> I would have a hard time justifying a
> commons-lang3-annotations
> > >>> module
> > >>> > > >> with only these 4 annotations.
> > >>> > > >>
> > >>> > > >> I could see having a Commons Annotations component though
> which
> > >>> for
> > >>> > good
> > >>> > > >> or bad would hold all annotations one could imagine having the
> > >>> Commons
> > >>> > > >> world. Hm... it smells a bit though...
> > >>> > > >>
> > >>> > > >> Gary
> > >>> > > >>
> > >>> > > >>
> > >>> > > >>>
> > >>> > > >>> Matt
> > >>> > > >>>
> > >>> > > >>> On Mon, Nov 28, 2016 at 1:21 PM, Pascal Schumacher
> > >>> > > >>> <pa...@gmx.net> wrote:
> > >>> > > >>>> Groovy had to change the license of its documentation from
> > CC-A
> > >>> 3.0
> > >>> > to
> > >>> > > >>> the
> > >>> > > >>>> Apache License during incubation:
> > >>> > > >>>>
> > >>> > > >>>> https://issues.apache.org/jira/browse/LEGAL-167
> > >>> > > >>>> http://markmail.org/message/2e7tehlwtpx625q4
> > >>> > > >>>> https://issues.apache.org/jira/browse/GROOVY-7470
> > >>> > > >>>>
> > >>> > > >>>> So I guess Commons is probably not allowed to use these
> files.
> > >>> > > >>>>
> > >>> > > >>>>
> > >>> > > >>>> Am 28.11.2016 um 18:58 schrieb Gary Gregory:
> > >>> > > >>>>>
> > >>> > > >>>>> On Mon, Nov 28, 2016 at 7:15 AM, Jochen Wiedmann
> > >>> > > >>>>> <jo...@gmail.com>
> > >>> > > >>>>> wrote:
> > >>> > > >>>>>
> > >>> > > >>>>>> On Mon, Nov 28, 2016 at 4:06 PM, sebb <se...@gmail.com>
> > >>> wrote:
> > >>> > > >>>>>>
> > >>> > > >>>>>>> The code would not run without the JCIP jar.
> > >>> > > >>>>>>
> > >>> > > >>>>>> Are there licensing issues regarding that jar?
> > >>> > > >>>>>>
> > >>> > > >>>>> Hm, according to https://www.apache.org/legal/
> resolved.html,
> > >>> the
> > >>> > > >>> license
> > >>> > > >>>>> "Creative Commons Attribution (CC-A) 2.5" is discussed in
> the
> > >>> > section
> > >>> > > >>> "HOW
> > >>> > > >>>>> SHOULD "WEAK COPYLEFT" LICENSES BE HANDLED?"
> > >>> > > >>>>>
> > >>> > > >>>>> It looks like we might have an issue but this is not clear
> to
> > >>> me as
> > >>> > > >>> IANAL.
> > >>> > > >>>>> I you look at the license summary
> > >>> > > >>>>> https://creativecommons.org/licenses/by/2.5/ it sure seems
> > >>> OK, but
> > >>> > > our
> > >>> > > >>>>> resolved.html has this license on a list of licenses to
> watch
> > >>> out
> > >>> > > for.
> > >>> > > >>>>>
> > >>> > > >>>>> So to be on the safe side, how do we best re-implement
> these?
> > >>> The
> > >>> > > >>>>> annotation names we can keep as is but I would imagine that
> > >>> we'd
> > >>> > want
> > >>> > > >>> to
> > >>> > > >>>>> re-write the Javadoc from scratch.
> > >>> > > >>>>>
> > >>> > > >>>>> Thoughts?
> > >>> > > >>>>>
> > >>> > > >>>>> Gary
> > >>> > > >>>>>
> > >>> > > >>>>>
> > >>> > > >>>>>> Jochen
> > >>> > > >>>>>>
> > >>> > > >>>>>>
> > >>> > > >>>>>> --
> > >>> > > >>>>>> The next time you hear: "Don't reinvent the wheel!"
> > >>> > > >>>>>>
> > >>> > > >>>>>> http://www.keystonedevelopment.co.uk/wp-
> > content/uploads/2014
> > >>> /10/
> > >>> > > >>>>>> evolution-of-the-wheel-300x85.jpg
> > >>> > > >>>>>>
> > >>> > > >>>>>> ------------------------------
> > ------------------------------
> > >>> > > ---------
> > >>> > > >>>>>> 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
> > >>> > > >>>>
> > >>> > > >>>
> > >>> > > >>> ------------------------------------------------------------
> > >>> ---------
> > >>> > > >>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > >>> > > >>> For additional commands, e-mail: dev-help@commons.apache.org
> > >>> > > >>>
> > >>> > > >>>
> > >>> > > >>
> > >>> > > >>
> > >>> > > >> --
> > >>> > > >> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > >>> > > >> Java Persistence with Hibernate, Second Edition
> > >>> > > >> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > >>> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > >>> > > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b
> > >>> 1af9fe6a2b8>
> > >>> > > >>
> > >>> > > >> <http:////
> > >>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > >>> > > 1617290459>
> > >>> > > >> JUnit in Action, Second Edition
> > >>> > > >> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > >>> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > >>> > >
> > >>> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac
> > >>> 902a24de418%22
> > >>> > > >
> > >>> > > >>
> > >>> > > >> <http:////
> > >>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > >>> > > 1935182021>
> > >>> > > >> Spring Batch in Action
> > >>> > > >> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > >>> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > >>> > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > >>> > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > >>> > > >> <http:////
> > >>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > >>> > > 1935182951>
> > >>> > > >> Blog: http://garygregory.wordpress.com
> > >>> > > >> Home: http://garygregory.com/
> > >>> > > >> Tweet! http://twitter.com/GaryGregory
> > >>> > > >>
> > >>> > > >
> > >>> > > >
> > >>> > > >
> > >>> > >
> > >>> > > ------------------------------------------------------------
> > >>> ---------
> > >>> > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > >>> > > For additional commands, e-mail: dev-help@commons.apache.org
> > >>> > >
> > >>> > >
> > >>> >
> > >>> >
> > >>> > --
> > >>> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > >>> > Java Persistence with Hibernate, Second Edition
> > >>> > <
> > >>> > https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie
> > >>> =UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCo
> > >>> de=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8
> > >>> > >
> > >>> >
> > >>> > <http:////
> > >>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> > a=1617290459
> > >>> >
> > >>> > JUnit in Action, Second Edition
> > >>> > <
> > >>> > https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie
> > >>> =UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCo
> > >>> de=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> > >>> > >
> > >>> >
> > >>> > <http:////
> > >>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> > a=1935182021
> > >>> >
> > >>> > Spring Batch in Action
> > >>> > <
> > >>> > https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie
> > >>> =UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCo
> > >>> de=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink
> > >>> _id%7D%7D%22%3ESpring+Batch+in+Action
> > >>> > >
> > >>> > <http:////
> > >>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> > a=1935182951
> > >>> >
> > >>> > Blog: http://garygregory.wordpress.com
> > >>> > Home: http://garygregory.com/
> > >>> > Tweet! http://twitter.com/GaryGregory
> > >>> >
> > >>>
> > >>
> > >>
> > >>
> > >> --
> > >> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > >> Java Persistence with Hibernate, Second Edition
> > >> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> > >>
> > >> <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> > 1617290459>
> > >> JUnit in Action, Second Edition
> > >> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> 18%22
> > >
> > >>
> > >> <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> > 1935182021>
> > >> Spring Batch in Action
> > >> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > >> <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> > 1935182951>
> > >> Blog: http://garygregory.wordpress.com
> > >> Home: http://garygregory.com/
> > >> Tweet! http://twitter.com/GaryGregory
> > >>
> > >
> > >
> > >
> > > --
> > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > Java Persistence with Hibernate, Second Edition
> > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> > >
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1617290459>
> > > JUnit in Action, Second Edition
> > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> 18%22
> > >
> > >
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1935182021>
> > > Spring Batch in Action
> > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1935182951>
> > > Blog: http://garygregory.wordpress.com
> > > Home: http://garygregory.com/
> > > Tweet! http://twitter.com/GaryGregory
> > >
> >
> >
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > Java Persistence with Hibernate, Second Edition
> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1617290459>
> > JUnit in Action, Second Edition
> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> 18%22
> > >
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1935182021>
> > Spring Batch in Action
> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1935182951>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
> >
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] Thread safety annotations

Posted by Matt Sicker <bo...@gmail.com>.
That's pretty neat. So it looks like two competing styles of annotations
here would be separate annotations for each concern, a single annotation
with an enum, or even separate annotations with boolean values or enums
(though that gets a little more complex come to think of it).

If only the JDK had an annotation for this.

On 29 November 2016 at 20:41, Gary Gregory <ga...@gmail.com> wrote:

> And an example:
>
> /**
>  * HTTP/2 compatible extension of {@link RequestConnControl}.
>  *
>  * @since 5.0
>  */
> @Contract(threading = ThreadingBehavior.IMMUTABLE)
> public class H2RequestConnControl extends RequestConnControl {
> ...
>
> Gary
>
> On Tue, Nov 29, 2016 at 6:40 PM, Gary Gregory <ga...@gmail.com>
> wrote:
>
> > FYI, this is how we're going to do it in HttpComponents 5:
> > https://svn.apache.org/repos/asf/httpcomponents/
> > httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/
> > annotation/ThreadingBehavior.java
> >
> > Gary
> >
> > On Tue, Nov 29, 2016 at 2:20 PM, Gary Gregory <ga...@gmail.com>
> > wrote:
> >
> >> On Tue, Nov 29, 2016 at 1:59 PM, Benedikt Ritter <br...@apache.org>
> >> wrote:
> >>
> >>> I agree with Oliver. I don't think we have consensus about if and how
> we
> >>> want to implement this. Does it even make sense to try to document
> this?
> >>> What value does such a documentation have, when it is wrong 50% of the
> >>> time? I just sumed up the feedback I got from one (!) user at the
> >>> conference. I think this needs more thought. This is why I suggested to
> >>> create a PR instead of committing this directly to master.
> >>>
> >>
> >> This is a good discussion. Let's keep in mind the audience for these new
> >> annotations:
> >>
> >> - Commons Lang
> >> - All of Commons
> >> - Any Java code.
> >>
> >> Just because we may not get to document thread safety properly in
> Commons
> >> Lang does not mean that any other developers will fail similarly.
> >>
> >> My goal is not to decorate all of Commons Lang with these new
> annotations
> >> and certainly not to take on the task of documenting all of Commons ;-)
> >>
> >> I look at these annotations as a tool, a Commons way of using
> annotations
> >> where some folks best see fit.
> >>
> >> Providing these annotations is one thing, using them another ;-)
> >>
> >> Gary
> >>
> >>
> >>>
> >>> Regards.
> >>> Benedikt
> >>>
> >>> Gary Gregory <ga...@gmail.com> schrieb am Di. 29. Nov. 2016 um
> >>> 22:33:
> >>>
> >>> > On Tue, Nov 29, 2016 at 1:12 PM, Oliver Heger <
> >>> > oliver.heger@oliver-heger.de>
> >>> > wrote:
> >>> >
> >>> > >
> >>> > >
> >>> > > Am 28.11.2016 um 22:28 schrieb Gary Gregory:
> >>> > > > WRT licensing, I re-implemented the annotations in git master.
> >>> Notice
> >>> > > that
> >>> > > > all Javadocs are different and much simpler for now. Feel free to
> >>> write
> >>> > > > more.
> >>> > >
> >>> > > As the length of this thread shows, using annotations for the
> >>> purpose of
> >>> > > documenting thread-safety can be a controversial topic.
> >>> > >
> >>> >
> >>> > How is the length of a thread a reflection of its controversy?
> >>> >
> >>> >
> >>> > > I do not see the advantage over a plain text documentation in
> >>> Javadoc.
> >>> > > Written text can even be more comprehensive.
> >>> > >
> >>> >
> >>> > One does not exclude the other. Annotations are easy to search. Text
> in
> >>> > Javadoc is subject to typos and formatting oddities that makes it
> much
> >>> > harder to search.
> >>> >
> >>> > Tools can work with annotations.
> >>> >
> >>> >
> >>> > >
> >>> > > The risk that the documentation goes out of sync with the
> >>> implementation
> >>> > > is given in both scenarios. But if a class announced as thread-safe
> >>> is
> >>> > > manipulated in a way that it is no longer thread-safe, I would
> >>> consider
> >>> > > this as a bug. This is also a kind of backwards-incompatible
> change.
> >>> > >
> >>> >
> >>> > That has nothing to do with annotations. If we change behavior in
> some
> >>> > incompatible way, that's the bug.
> >>> >
> >>> > I can interpret what you wrote as: If I remove an @Override
> annotation,
> >>> > then that is backwards-incompatible change. That sounds extreme.
> >>> >
> >>> > I do not think we have talked about annotations in the context of
> >>> backwards
> >>> > compatibility. Does this deserve a separate discussion?
> >>> >
> >>> > a third penny,
> >>> > Gary
> >>> >
> >>> >
> >>> > >
> >>> > > My 2 cents
> >>> > > Oliver
> >>> > >
> >>> > > >
> >>> > > > Gary
> >>> > > >
> >>> > > > On Mon, Nov 28, 2016 at 12:55 PM, Gary Gregory <
> >>> garydgregory@gmail.com
> >>> > >
> >>> > > > wrote:
> >>> > > >
> >>> > > >> On Mon, Nov 28, 2016 at 12:18 PM, Matt Benson <
> >>> gudnabrsam@gmail.com>
> >>> > > >> wrote:
> >>> > > >>
> >>> > > >>> I hoped to stay out of this. :) Points:
> >>> > > >>>
> >>> > > >>> * "provided" scope is another Maven mechanism that compiles
> >>> against a
> >>> > > >>> given dependency but does not pull the dependency in as a
> runtime
> >>> > > >>> dependency. I personally prefer it to marking a dependency
> >>> optional.
> >>> > > >>> * For annotations with only classfile retention, a future
> package
> >>> > > >>> rename e.g. lang4 would not require a consumer to upgrade just
> >>> for
> >>> > the
> >>> > > >>> renamed annotation, though nothing would stop them from doing
> >>> so. A
> >>> > > >>> given project could depend on either or both of lang3 and lang4
> >>> in
> >>> > any
> >>> > > >>> combination of compile-only or runtime-inclusive scope with no
> >>> > > >>> problems.
> >>> > > >>> * A standalone annotations component might be interesting, but
> >>> I'm
> >>> > not
> >>> > > >>> sure if the proposed annotations constitute a critical mass
> >>> adequate
> >>> > > >>> to justify it.
> >>> > > >>>
> >>> > > >>
> >>> > > >> I would have a hard time justifying a commons-lang3-annotations
> >>> module
> >>> > > >> with only these 4 annotations.
> >>> > > >>
> >>> > > >> I could see having a Commons Annotations component though which
> >>> for
> >>> > good
> >>> > > >> or bad would hold all annotations one could imagine having the
> >>> Commons
> >>> > > >> world. Hm... it smells a bit though...
> >>> > > >>
> >>> > > >> Gary
> >>> > > >>
> >>> > > >>
> >>> > > >>>
> >>> > > >>> Matt
> >>> > > >>>
> >>> > > >>> On Mon, Nov 28, 2016 at 1:21 PM, Pascal Schumacher
> >>> > > >>> <pa...@gmx.net> wrote:
> >>> > > >>>> Groovy had to change the license of its documentation from
> CC-A
> >>> 3.0
> >>> > to
> >>> > > >>> the
> >>> > > >>>> Apache License during incubation:
> >>> > > >>>>
> >>> > > >>>> https://issues.apache.org/jira/browse/LEGAL-167
> >>> > > >>>> http://markmail.org/message/2e7tehlwtpx625q4
> >>> > > >>>> https://issues.apache.org/jira/browse/GROOVY-7470
> >>> > > >>>>
> >>> > > >>>> So I guess Commons is probably not allowed to use these files.
> >>> > > >>>>
> >>> > > >>>>
> >>> > > >>>> Am 28.11.2016 um 18:58 schrieb Gary Gregory:
> >>> > > >>>>>
> >>> > > >>>>> On Mon, Nov 28, 2016 at 7:15 AM, Jochen Wiedmann
> >>> > > >>>>> <jo...@gmail.com>
> >>> > > >>>>> wrote:
> >>> > > >>>>>
> >>> > > >>>>>> On Mon, Nov 28, 2016 at 4:06 PM, sebb <se...@gmail.com>
> >>> wrote:
> >>> > > >>>>>>
> >>> > > >>>>>>> The code would not run without the JCIP jar.
> >>> > > >>>>>>
> >>> > > >>>>>> Are there licensing issues regarding that jar?
> >>> > > >>>>>>
> >>> > > >>>>> Hm, according to https://www.apache.org/legal/resolved.html,
> >>> the
> >>> > > >>> license
> >>> > > >>>>> "Creative Commons Attribution (CC-A) 2.5" is discussed in the
> >>> > section
> >>> > > >>> "HOW
> >>> > > >>>>> SHOULD "WEAK COPYLEFT" LICENSES BE HANDLED?"
> >>> > > >>>>>
> >>> > > >>>>> It looks like we might have an issue but this is not clear to
> >>> me as
> >>> > > >>> IANAL.
> >>> > > >>>>> I you look at the license summary
> >>> > > >>>>> https://creativecommons.org/licenses/by/2.5/ it sure seems
> >>> OK, but
> >>> > > our
> >>> > > >>>>> resolved.html has this license on a list of licenses to watch
> >>> out
> >>> > > for.
> >>> > > >>>>>
> >>> > > >>>>> So to be on the safe side, how do we best re-implement these?
> >>> The
> >>> > > >>>>> annotation names we can keep as is but I would imagine that
> >>> we'd
> >>> > want
> >>> > > >>> to
> >>> > > >>>>> re-write the Javadoc from scratch.
> >>> > > >>>>>
> >>> > > >>>>> Thoughts?
> >>> > > >>>>>
> >>> > > >>>>> Gary
> >>> > > >>>>>
> >>> > > >>>>>
> >>> > > >>>>>> Jochen
> >>> > > >>>>>>
> >>> > > >>>>>>
> >>> > > >>>>>> --
> >>> > > >>>>>> The next time you hear: "Don't reinvent the wheel!"
> >>> > > >>>>>>
> >>> > > >>>>>> http://www.keystonedevelopment.co.uk/wp-
> content/uploads/2014
> >>> /10/
> >>> > > >>>>>> evolution-of-the-wheel-300x85.jpg
> >>> > > >>>>>>
> >>> > > >>>>>> ------------------------------
> ------------------------------
> >>> > > ---------
> >>> > > >>>>>> 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
> >>> > > >>>>
> >>> > > >>>
> >>> > > >>> ------------------------------------------------------------
> >>> ---------
> >>> > > >>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >>> > > >>> For additional commands, e-mail: dev-help@commons.apache.org
> >>> > > >>>
> >>> > > >>>
> >>> > > >>
> >>> > > >>
> >>> > > >> --
> >>> > > >> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >>> > > >> Java Persistence with Hibernate, Second Edition
> >>> > > >> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> >>> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> >>> > > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b
> >>> 1af9fe6a2b8>
> >>> > > >>
> >>> > > >> <http:////
> >>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> >>> > > 1617290459>
> >>> > > >> JUnit in Action, Second Edition
> >>> > > >> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> >>> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> >>> > >
> >>> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac
> >>> 902a24de418%22
> >>> > > >
> >>> > > >>
> >>> > > >> <http:////
> >>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> >>> > > 1935182021>
> >>> > > >> Spring Batch in Action
> >>> > > >> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> >>> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> >>> > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >>> > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >>> > > >> <http:////
> >>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> >>> > > 1935182951>
> >>> > > >> Blog: http://garygregory.wordpress.com
> >>> > > >> Home: http://garygregory.com/
> >>> > > >> Tweet! http://twitter.com/GaryGregory
> >>> > > >>
> >>> > > >
> >>> > > >
> >>> > > >
> >>> > >
> >>> > > ------------------------------------------------------------
> >>> ---------
> >>> > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >>> > > For additional commands, e-mail: dev-help@commons.apache.org
> >>> > >
> >>> > >
> >>> >
> >>> >
> >>> > --
> >>> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >>> > Java Persistence with Hibernate, Second Edition
> >>> > <
> >>> > https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie
> >>> =UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCo
> >>> de=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8
> >>> > >
> >>> >
> >>> > <http:////
> >>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> a=1617290459
> >>> >
> >>> > JUnit in Action, Second Edition
> >>> > <
> >>> > https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie
> >>> =UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCo
> >>> de=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >>> > >
> >>> >
> >>> > <http:////
> >>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> a=1935182021
> >>> >
> >>> > Spring Batch in Action
> >>> > <
> >>> > https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie
> >>> =UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCo
> >>> de=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink
> >>> _id%7D%7D%22%3ESpring+Batch+in+Action
> >>> > >
> >>> > <http:////
> >>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> a=1935182951
> >>> >
> >>> > Blog: http://garygregory.wordpress.com
> >>> > Home: http://garygregory.com/
> >>> > Tweet! http://twitter.com/GaryGregory
> >>> >
> >>>
> >>
> >>
> >>
> >> --
> >> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >> Java Persistence with Hibernate, Second Edition
> >> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> >>
> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> >> JUnit in Action, Second Edition
> >> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
> >>
> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> >> Spring Batch in Action
> >> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> >> Blog: http://garygregory.wordpress.com
> >> Home: http://garygregory.com/
> >> Tweet! http://twitter.com/GaryGregory
> >>
> >
> >
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > Java Persistence with Hibernate, Second Edition
> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> > JUnit in Action, Second Edition
> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> > Spring Batch in Action
> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
> >
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
Matt Sicker <bo...@gmail.com>

Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
And an example:

/**
 * HTTP/2 compatible extension of {@link RequestConnControl}.
 *
 * @since 5.0
 */
@Contract(threading = ThreadingBehavior.IMMUTABLE)
public class H2RequestConnControl extends RequestConnControl {
...

Gary

On Tue, Nov 29, 2016 at 6:40 PM, Gary Gregory <ga...@gmail.com>
wrote:

> FYI, this is how we're going to do it in HttpComponents 5:
> https://svn.apache.org/repos/asf/httpcomponents/
> httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/
> annotation/ThreadingBehavior.java
>
> Gary
>
> On Tue, Nov 29, 2016 at 2:20 PM, Gary Gregory <ga...@gmail.com>
> wrote:
>
>> On Tue, Nov 29, 2016 at 1:59 PM, Benedikt Ritter <br...@apache.org>
>> wrote:
>>
>>> I agree with Oliver. I don't think we have consensus about if and how we
>>> want to implement this. Does it even make sense to try to document this?
>>> What value does such a documentation have, when it is wrong 50% of the
>>> time? I just sumed up the feedback I got from one (!) user at the
>>> conference. I think this needs more thought. This is why I suggested to
>>> create a PR instead of committing this directly to master.
>>>
>>
>> This is a good discussion. Let's keep in mind the audience for these new
>> annotations:
>>
>> - Commons Lang
>> - All of Commons
>> - Any Java code.
>>
>> Just because we may not get to document thread safety properly in Commons
>> Lang does not mean that any other developers will fail similarly.
>>
>> My goal is not to decorate all of Commons Lang with these new annotations
>> and certainly not to take on the task of documenting all of Commons ;-)
>>
>> I look at these annotations as a tool, a Commons way of using annotations
>> where some folks best see fit.
>>
>> Providing these annotations is one thing, using them another ;-)
>>
>> Gary
>>
>>
>>>
>>> Regards.
>>> Benedikt
>>>
>>> Gary Gregory <ga...@gmail.com> schrieb am Di. 29. Nov. 2016 um
>>> 22:33:
>>>
>>> > On Tue, Nov 29, 2016 at 1:12 PM, Oliver Heger <
>>> > oliver.heger@oliver-heger.de>
>>> > wrote:
>>> >
>>> > >
>>> > >
>>> > > Am 28.11.2016 um 22:28 schrieb Gary Gregory:
>>> > > > WRT licensing, I re-implemented the annotations in git master.
>>> Notice
>>> > > that
>>> > > > all Javadocs are different and much simpler for now. Feel free to
>>> write
>>> > > > more.
>>> > >
>>> > > As the length of this thread shows, using annotations for the
>>> purpose of
>>> > > documenting thread-safety can be a controversial topic.
>>> > >
>>> >
>>> > How is the length of a thread a reflection of its controversy?
>>> >
>>> >
>>> > > I do not see the advantage over a plain text documentation in
>>> Javadoc.
>>> > > Written text can even be more comprehensive.
>>> > >
>>> >
>>> > One does not exclude the other. Annotations are easy to search. Text in
>>> > Javadoc is subject to typos and formatting oddities that makes it much
>>> > harder to search.
>>> >
>>> > Tools can work with annotations.
>>> >
>>> >
>>> > >
>>> > > The risk that the documentation goes out of sync with the
>>> implementation
>>> > > is given in both scenarios. But if a class announced as thread-safe
>>> is
>>> > > manipulated in a way that it is no longer thread-safe, I would
>>> consider
>>> > > this as a bug. This is also a kind of backwards-incompatible change.
>>> > >
>>> >
>>> > That has nothing to do with annotations. If we change behavior in some
>>> > incompatible way, that's the bug.
>>> >
>>> > I can interpret what you wrote as: If I remove an @Override annotation,
>>> > then that is backwards-incompatible change. That sounds extreme.
>>> >
>>> > I do not think we have talked about annotations in the context of
>>> backwards
>>> > compatibility. Does this deserve a separate discussion?
>>> >
>>> > a third penny,
>>> > Gary
>>> >
>>> >
>>> > >
>>> > > My 2 cents
>>> > > Oliver
>>> > >
>>> > > >
>>> > > > Gary
>>> > > >
>>> > > > On Mon, Nov 28, 2016 at 12:55 PM, Gary Gregory <
>>> garydgregory@gmail.com
>>> > >
>>> > > > wrote:
>>> > > >
>>> > > >> On Mon, Nov 28, 2016 at 12:18 PM, Matt Benson <
>>> gudnabrsam@gmail.com>
>>> > > >> wrote:
>>> > > >>
>>> > > >>> I hoped to stay out of this. :) Points:
>>> > > >>>
>>> > > >>> * "provided" scope is another Maven mechanism that compiles
>>> against a
>>> > > >>> given dependency but does not pull the dependency in as a runtime
>>> > > >>> dependency. I personally prefer it to marking a dependency
>>> optional.
>>> > > >>> * For annotations with only classfile retention, a future package
>>> > > >>> rename e.g. lang4 would not require a consumer to upgrade just
>>> for
>>> > the
>>> > > >>> renamed annotation, though nothing would stop them from doing
>>> so. A
>>> > > >>> given project could depend on either or both of lang3 and lang4
>>> in
>>> > any
>>> > > >>> combination of compile-only or runtime-inclusive scope with no
>>> > > >>> problems.
>>> > > >>> * A standalone annotations component might be interesting, but
>>> I'm
>>> > not
>>> > > >>> sure if the proposed annotations constitute a critical mass
>>> adequate
>>> > > >>> to justify it.
>>> > > >>>
>>> > > >>
>>> > > >> I would have a hard time justifying a commons-lang3-annotations
>>> module
>>> > > >> with only these 4 annotations.
>>> > > >>
>>> > > >> I could see having a Commons Annotations component though which
>>> for
>>> > good
>>> > > >> or bad would hold all annotations one could imagine having the
>>> Commons
>>> > > >> world. Hm... it smells a bit though...
>>> > > >>
>>> > > >> Gary
>>> > > >>
>>> > > >>
>>> > > >>>
>>> > > >>> Matt
>>> > > >>>
>>> > > >>> On Mon, Nov 28, 2016 at 1:21 PM, Pascal Schumacher
>>> > > >>> <pa...@gmx.net> wrote:
>>> > > >>>> Groovy had to change the license of its documentation from CC-A
>>> 3.0
>>> > to
>>> > > >>> the
>>> > > >>>> Apache License during incubation:
>>> > > >>>>
>>> > > >>>> https://issues.apache.org/jira/browse/LEGAL-167
>>> > > >>>> http://markmail.org/message/2e7tehlwtpx625q4
>>> > > >>>> https://issues.apache.org/jira/browse/GROOVY-7470
>>> > > >>>>
>>> > > >>>> So I guess Commons is probably not allowed to use these files.
>>> > > >>>>
>>> > > >>>>
>>> > > >>>> Am 28.11.2016 um 18:58 schrieb Gary Gregory:
>>> > > >>>>>
>>> > > >>>>> On Mon, Nov 28, 2016 at 7:15 AM, Jochen Wiedmann
>>> > > >>>>> <jo...@gmail.com>
>>> > > >>>>> wrote:
>>> > > >>>>>
>>> > > >>>>>> On Mon, Nov 28, 2016 at 4:06 PM, sebb <se...@gmail.com>
>>> wrote:
>>> > > >>>>>>
>>> > > >>>>>>> The code would not run without the JCIP jar.
>>> > > >>>>>>
>>> > > >>>>>> Are there licensing issues regarding that jar?
>>> > > >>>>>>
>>> > > >>>>> Hm, according to https://www.apache.org/legal/resolved.html,
>>> the
>>> > > >>> license
>>> > > >>>>> "Creative Commons Attribution (CC-A) 2.5" is discussed in the
>>> > section
>>> > > >>> "HOW
>>> > > >>>>> SHOULD "WEAK COPYLEFT" LICENSES BE HANDLED?"
>>> > > >>>>>
>>> > > >>>>> It looks like we might have an issue but this is not clear to
>>> me as
>>> > > >>> IANAL.
>>> > > >>>>> I you look at the license summary
>>> > > >>>>> https://creativecommons.org/licenses/by/2.5/ it sure seems
>>> OK, but
>>> > > our
>>> > > >>>>> resolved.html has this license on a list of licenses to watch
>>> out
>>> > > for.
>>> > > >>>>>
>>> > > >>>>> So to be on the safe side, how do we best re-implement these?
>>> The
>>> > > >>>>> annotation names we can keep as is but I would imagine that
>>> we'd
>>> > want
>>> > > >>> to
>>> > > >>>>> re-write the Javadoc from scratch.
>>> > > >>>>>
>>> > > >>>>> Thoughts?
>>> > > >>>>>
>>> > > >>>>> Gary
>>> > > >>>>>
>>> > > >>>>>
>>> > > >>>>>> Jochen
>>> > > >>>>>>
>>> > > >>>>>>
>>> > > >>>>>> --
>>> > > >>>>>> The next time you hear: "Don't reinvent the wheel!"
>>> > > >>>>>>
>>> > > >>>>>> http://www.keystonedevelopment.co.uk/wp-content/uploads/2014
>>> /10/
>>> > > >>>>>> evolution-of-the-wheel-300x85.jpg
>>> > > >>>>>>
>>> > > >>>>>> ------------------------------------------------------------
>>> > > ---------
>>> > > >>>>>> 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
>>> > > >>>>
>>> > > >>>
>>> > > >>> ------------------------------------------------------------
>>> ---------
>>> > > >>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> > > >>> For additional commands, e-mail: dev-help@commons.apache.org
>>> > > >>>
>>> > > >>>
>>> > > >>
>>> > > >>
>>> > > >> --
>>> > > >> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>> > > >> Java Persistence with Hibernate, Second Edition
>>> > > >> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>>> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>>> > > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b
>>> 1af9fe6a2b8>
>>> > > >>
>>> > > >> <http:////
>>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>>> > > 1617290459>
>>> > > >> JUnit in Action, Second Edition
>>> > > >> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>>> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>>> > >
>>> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac
>>> 902a24de418%22
>>> > > >
>>> > > >>
>>> > > >> <http:////
>>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>>> > > 1935182021>
>>> > > >> Spring Batch in Action
>>> > > >> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>>> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>>> > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>>> > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>>> > > >> <http:////
>>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>>> > > 1935182951>
>>> > > >> Blog: http://garygregory.wordpress.com
>>> > > >> Home: http://garygregory.com/
>>> > > >> Tweet! http://twitter.com/GaryGregory
>>> > > >>
>>> > > >
>>> > > >
>>> > > >
>>> > >
>>> > > ------------------------------------------------------------
>>> ---------
>>> > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> > > For additional commands, e-mail: dev-help@commons.apache.org
>>> > >
>>> > >
>>> >
>>> >
>>> > --
>>> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>> > Java Persistence with Hibernate, Second Edition
>>> > <
>>> > https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie
>>> =UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCo
>>> de=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8
>>> > >
>>> >
>>> > <http:////
>>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459
>>> >
>>> > JUnit in Action, Second Edition
>>> > <
>>> > https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie
>>> =UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCo
>>> de=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
>>> > >
>>> >
>>> > <http:////
>>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021
>>> >
>>> > Spring Batch in Action
>>> > <
>>> > https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie
>>> =UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCo
>>> de=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink
>>> _id%7D%7D%22%3ESpring+Batch+in+Action
>>> > >
>>> > <http:////
>>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951
>>> >
>>> > Blog: http://garygregory.wordpress.com
>>> > Home: http://garygregory.com/
>>> > Tweet! http://twitter.com/GaryGregory
>>> >
>>>
>>
>>
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> Java Persistence with Hibernate, Second Edition
>> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>>
>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
>> JUnit in Action, Second Edition
>> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>
>>
>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
>> Spring Batch in Action
>> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
FYI, this is how we're going to do it in HttpComponents 5:
https://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/annotation/ThreadingBehavior.java

Gary

On Tue, Nov 29, 2016 at 2:20 PM, Gary Gregory <ga...@gmail.com>
wrote:

> On Tue, Nov 29, 2016 at 1:59 PM, Benedikt Ritter <br...@apache.org>
> wrote:
>
>> I agree with Oliver. I don't think we have consensus about if and how we
>> want to implement this. Does it even make sense to try to document this?
>> What value does such a documentation have, when it is wrong 50% of the
>> time? I just sumed up the feedback I got from one (!) user at the
>> conference. I think this needs more thought. This is why I suggested to
>> create a PR instead of committing this directly to master.
>>
>
> This is a good discussion. Let's keep in mind the audience for these new
> annotations:
>
> - Commons Lang
> - All of Commons
> - Any Java code.
>
> Just because we may not get to document thread safety properly in Commons
> Lang does not mean that any other developers will fail similarly.
>
> My goal is not to decorate all of Commons Lang with these new annotations
> and certainly not to take on the task of documenting all of Commons ;-)
>
> I look at these annotations as a tool, a Commons way of using annotations
> where some folks best see fit.
>
> Providing these annotations is one thing, using them another ;-)
>
> Gary
>
>
>>
>> Regards.
>> Benedikt
>>
>> Gary Gregory <ga...@gmail.com> schrieb am Di. 29. Nov. 2016 um
>> 22:33:
>>
>> > On Tue, Nov 29, 2016 at 1:12 PM, Oliver Heger <
>> > oliver.heger@oliver-heger.de>
>> > wrote:
>> >
>> > >
>> > >
>> > > Am 28.11.2016 um 22:28 schrieb Gary Gregory:
>> > > > WRT licensing, I re-implemented the annotations in git master.
>> Notice
>> > > that
>> > > > all Javadocs are different and much simpler for now. Feel free to
>> write
>> > > > more.
>> > >
>> > > As the length of this thread shows, using annotations for the purpose
>> of
>> > > documenting thread-safety can be a controversial topic.
>> > >
>> >
>> > How is the length of a thread a reflection of its controversy?
>> >
>> >
>> > > I do not see the advantage over a plain text documentation in Javadoc.
>> > > Written text can even be more comprehensive.
>> > >
>> >
>> > One does not exclude the other. Annotations are easy to search. Text in
>> > Javadoc is subject to typos and formatting oddities that makes it much
>> > harder to search.
>> >
>> > Tools can work with annotations.
>> >
>> >
>> > >
>> > > The risk that the documentation goes out of sync with the
>> implementation
>> > > is given in both scenarios. But if a class announced as thread-safe is
>> > > manipulated in a way that it is no longer thread-safe, I would
>> consider
>> > > this as a bug. This is also a kind of backwards-incompatible change.
>> > >
>> >
>> > That has nothing to do with annotations. If we change behavior in some
>> > incompatible way, that's the bug.
>> >
>> > I can interpret what you wrote as: If I remove an @Override annotation,
>> > then that is backwards-incompatible change. That sounds extreme.
>> >
>> > I do not think we have talked about annotations in the context of
>> backwards
>> > compatibility. Does this deserve a separate discussion?
>> >
>> > a third penny,
>> > Gary
>> >
>> >
>> > >
>> > > My 2 cents
>> > > Oliver
>> > >
>> > > >
>> > > > Gary
>> > > >
>> > > > On Mon, Nov 28, 2016 at 12:55 PM, Gary Gregory <
>> garydgregory@gmail.com
>> > >
>> > > > wrote:
>> > > >
>> > > >> On Mon, Nov 28, 2016 at 12:18 PM, Matt Benson <
>> gudnabrsam@gmail.com>
>> > > >> wrote:
>> > > >>
>> > > >>> I hoped to stay out of this. :) Points:
>> > > >>>
>> > > >>> * "provided" scope is another Maven mechanism that compiles
>> against a
>> > > >>> given dependency but does not pull the dependency in as a runtime
>> > > >>> dependency. I personally prefer it to marking a dependency
>> optional.
>> > > >>> * For annotations with only classfile retention, a future package
>> > > >>> rename e.g. lang4 would not require a consumer to upgrade just for
>> > the
>> > > >>> renamed annotation, though nothing would stop them from doing so.
>> A
>> > > >>> given project could depend on either or both of lang3 and lang4 in
>> > any
>> > > >>> combination of compile-only or runtime-inclusive scope with no
>> > > >>> problems.
>> > > >>> * A standalone annotations component might be interesting, but I'm
>> > not
>> > > >>> sure if the proposed annotations constitute a critical mass
>> adequate
>> > > >>> to justify it.
>> > > >>>
>> > > >>
>> > > >> I would have a hard time justifying a commons-lang3-annotations
>> module
>> > > >> with only these 4 annotations.
>> > > >>
>> > > >> I could see having a Commons Annotations component though which for
>> > good
>> > > >> or bad would hold all annotations one could imagine having the
>> Commons
>> > > >> world. Hm... it smells a bit though...
>> > > >>
>> > > >> Gary
>> > > >>
>> > > >>
>> > > >>>
>> > > >>> Matt
>> > > >>>
>> > > >>> On Mon, Nov 28, 2016 at 1:21 PM, Pascal Schumacher
>> > > >>> <pa...@gmx.net> wrote:
>> > > >>>> Groovy had to change the license of its documentation from CC-A
>> 3.0
>> > to
>> > > >>> the
>> > > >>>> Apache License during incubation:
>> > > >>>>
>> > > >>>> https://issues.apache.org/jira/browse/LEGAL-167
>> > > >>>> http://markmail.org/message/2e7tehlwtpx625q4
>> > > >>>> https://issues.apache.org/jira/browse/GROOVY-7470
>> > > >>>>
>> > > >>>> So I guess Commons is probably not allowed to use these files.
>> > > >>>>
>> > > >>>>
>> > > >>>> Am 28.11.2016 um 18:58 schrieb Gary Gregory:
>> > > >>>>>
>> > > >>>>> On Mon, Nov 28, 2016 at 7:15 AM, Jochen Wiedmann
>> > > >>>>> <jo...@gmail.com>
>> > > >>>>> wrote:
>> > > >>>>>
>> > > >>>>>> On Mon, Nov 28, 2016 at 4:06 PM, sebb <se...@gmail.com>
>> wrote:
>> > > >>>>>>
>> > > >>>>>>> The code would not run without the JCIP jar.
>> > > >>>>>>
>> > > >>>>>> Are there licensing issues regarding that jar?
>> > > >>>>>>
>> > > >>>>> Hm, according to https://www.apache.org/legal/resolved.html,
>> the
>> > > >>> license
>> > > >>>>> "Creative Commons Attribution (CC-A) 2.5" is discussed in the
>> > section
>> > > >>> "HOW
>> > > >>>>> SHOULD "WEAK COPYLEFT" LICENSES BE HANDLED?"
>> > > >>>>>
>> > > >>>>> It looks like we might have an issue but this is not clear to
>> me as
>> > > >>> IANAL.
>> > > >>>>> I you look at the license summary
>> > > >>>>> https://creativecommons.org/licenses/by/2.5/ it sure seems OK,
>> but
>> > > our
>> > > >>>>> resolved.html has this license on a list of licenses to watch
>> out
>> > > for.
>> > > >>>>>
>> > > >>>>> So to be on the safe side, how do we best re-implement these?
>> The
>> > > >>>>> annotation names we can keep as is but I would imagine that we'd
>> > want
>> > > >>> to
>> > > >>>>> re-write the Javadoc from scratch.
>> > > >>>>>
>> > > >>>>> Thoughts?
>> > > >>>>>
>> > > >>>>> Gary
>> > > >>>>>
>> > > >>>>>
>> > > >>>>>> Jochen
>> > > >>>>>>
>> > > >>>>>>
>> > > >>>>>> --
>> > > >>>>>> The next time you hear: "Don't reinvent the wheel!"
>> > > >>>>>>
>> > > >>>>>> http://www.keystonedevelopment.co.uk/wp-content/uploads/
>> 2014/10/
>> > > >>>>>> evolution-of-the-wheel-300x85.jpg
>> > > >>>>>>
>> > > >>>>>> ------------------------------------------------------------
>> > > ---------
>> > > >>>>>> 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
>> > > >>>>
>> > > >>>
>> > > >>> ------------------------------------------------------------
>> ---------
>> > > >>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> > > >>> For additional commands, e-mail: dev-help@commons.apache.org
>> > > >>>
>> > > >>>
>> > > >>
>> > > >>
>> > > >> --
>> > > >> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > > >> Java Persistence with Hibernate, Second Edition
>> > > >> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> > > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b
>> 1af9fe6a2b8>
>> > > >>
>> > > >> <http:////
>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> > > 1617290459>
>> > > >> JUnit in Action, Second Edition
>> > > >> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> > >
>> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac
>> 902a24de418%22
>> > > >
>> > > >>
>> > > >> <http:////
>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> > > 1935182021>
>> > > >> Spring Batch in Action
>> > > >> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> > > >> <http:////
>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> > > 1935182951>
>> > > >> Blog: http://garygregory.wordpress.com
>> > > >> Home: http://garygregory.com/
>> > > >> Tweet! http://twitter.com/GaryGregory
>> > > >>
>> > > >
>> > > >
>> > > >
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> > > For additional commands, e-mail: dev-help@commons.apache.org
>> > >
>> > >
>> >
>> >
>> > --
>> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > Java Persistence with Hibernate, Second Edition
>> > <
>> > https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?
>> ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&link
>> Code=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8
>> > >
>> >
>> > <http:////
>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
>> > JUnit in Action, Second Edition
>> > <
>> > https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?
>> ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&link
>> Code=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
>> > >
>> >
>> > <http:////
>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
>> > Spring Batch in Action
>> > <
>> > https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?
>> ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&link
>> Code=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Bli
>> nk_id%7D%7D%22%3ESpring+Batch+in+Action
>> > >
>> > <http:////
>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
>> > Blog: http://garygregory.wordpress.com
>> > Home: http://garygregory.com/
>> > Tweet! http://twitter.com/GaryGregory
>> >
>>
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
On Tue, Nov 29, 2016 at 1:59 PM, Benedikt Ritter <br...@apache.org> wrote:

> I agree with Oliver. I don't think we have consensus about if and how we
> want to implement this. Does it even make sense to try to document this?
> What value does such a documentation have, when it is wrong 50% of the
> time? I just sumed up the feedback I got from one (!) user at the
> conference. I think this needs more thought. This is why I suggested to
> create a PR instead of committing this directly to master.
>

This is a good discussion. Let's keep in mind the audience for these new
annotations:

- Commons Lang
- All of Commons
- Any Java code.

Just because we may not get to document thread safety properly in Commons
Lang does not mean that any other developers will fail similarly.

My goal is not to decorate all of Commons Lang with these new annotations
and certainly not to take on the task of documenting all of Commons ;-)

I look at these annotations as a tool, a Commons way of using annotations
where some folks best see fit.

Providing these annotations is one thing, using them another ;-)

Gary


>
> Regards.
> Benedikt
>
> Gary Gregory <ga...@gmail.com> schrieb am Di. 29. Nov. 2016 um
> 22:33:
>
> > On Tue, Nov 29, 2016 at 1:12 PM, Oliver Heger <
> > oliver.heger@oliver-heger.de>
> > wrote:
> >
> > >
> > >
> > > Am 28.11.2016 um 22:28 schrieb Gary Gregory:
> > > > WRT licensing, I re-implemented the annotations in git master. Notice
> > > that
> > > > all Javadocs are different and much simpler for now. Feel free to
> write
> > > > more.
> > >
> > > As the length of this thread shows, using annotations for the purpose
> of
> > > documenting thread-safety can be a controversial topic.
> > >
> >
> > How is the length of a thread a reflection of its controversy?
> >
> >
> > > I do not see the advantage over a plain text documentation in Javadoc.
> > > Written text can even be more comprehensive.
> > >
> >
> > One does not exclude the other. Annotations are easy to search. Text in
> > Javadoc is subject to typos and formatting oddities that makes it much
> > harder to search.
> >
> > Tools can work with annotations.
> >
> >
> > >
> > > The risk that the documentation goes out of sync with the
> implementation
> > > is given in both scenarios. But if a class announced as thread-safe is
> > > manipulated in a way that it is no longer thread-safe, I would consider
> > > this as a bug. This is also a kind of backwards-incompatible change.
> > >
> >
> > That has nothing to do with annotations. If we change behavior in some
> > incompatible way, that's the bug.
> >
> > I can interpret what you wrote as: If I remove an @Override annotation,
> > then that is backwards-incompatible change. That sounds extreme.
> >
> > I do not think we have talked about annotations in the context of
> backwards
> > compatibility. Does this deserve a separate discussion?
> >
> > a third penny,
> > Gary
> >
> >
> > >
> > > My 2 cents
> > > Oliver
> > >
> > > >
> > > > Gary
> > > >
> > > > On Mon, Nov 28, 2016 at 12:55 PM, Gary Gregory <
> garydgregory@gmail.com
> > >
> > > > wrote:
> > > >
> > > >> On Mon, Nov 28, 2016 at 12:18 PM, Matt Benson <gudnabrsam@gmail.com
> >
> > > >> wrote:
> > > >>
> > > >>> I hoped to stay out of this. :) Points:
> > > >>>
> > > >>> * "provided" scope is another Maven mechanism that compiles
> against a
> > > >>> given dependency but does not pull the dependency in as a runtime
> > > >>> dependency. I personally prefer it to marking a dependency
> optional.
> > > >>> * For annotations with only classfile retention, a future package
> > > >>> rename e.g. lang4 would not require a consumer to upgrade just for
> > the
> > > >>> renamed annotation, though nothing would stop them from doing so. A
> > > >>> given project could depend on either or both of lang3 and lang4 in
> > any
> > > >>> combination of compile-only or runtime-inclusive scope with no
> > > >>> problems.
> > > >>> * A standalone annotations component might be interesting, but I'm
> > not
> > > >>> sure if the proposed annotations constitute a critical mass
> adequate
> > > >>> to justify it.
> > > >>>
> > > >>
> > > >> I would have a hard time justifying a commons-lang3-annotations
> module
> > > >> with only these 4 annotations.
> > > >>
> > > >> I could see having a Commons Annotations component though which for
> > good
> > > >> or bad would hold all annotations one could imagine having the
> Commons
> > > >> world. Hm... it smells a bit though...
> > > >>
> > > >> Gary
> > > >>
> > > >>
> > > >>>
> > > >>> Matt
> > > >>>
> > > >>> On Mon, Nov 28, 2016 at 1:21 PM, Pascal Schumacher
> > > >>> <pa...@gmx.net> wrote:
> > > >>>> Groovy had to change the license of its documentation from CC-A
> 3.0
> > to
> > > >>> the
> > > >>>> Apache License during incubation:
> > > >>>>
> > > >>>> https://issues.apache.org/jira/browse/LEGAL-167
> > > >>>> http://markmail.org/message/2e7tehlwtpx625q4
> > > >>>> https://issues.apache.org/jira/browse/GROOVY-7470
> > > >>>>
> > > >>>> So I guess Commons is probably not allowed to use these files.
> > > >>>>
> > > >>>>
> > > >>>> Am 28.11.2016 um 18:58 schrieb Gary Gregory:
> > > >>>>>
> > > >>>>> On Mon, Nov 28, 2016 at 7:15 AM, Jochen Wiedmann
> > > >>>>> <jo...@gmail.com>
> > > >>>>> wrote:
> > > >>>>>
> > > >>>>>> On Mon, Nov 28, 2016 at 4:06 PM, sebb <se...@gmail.com> wrote:
> > > >>>>>>
> > > >>>>>>> The code would not run without the JCIP jar.
> > > >>>>>>
> > > >>>>>> Are there licensing issues regarding that jar?
> > > >>>>>>
> > > >>>>> Hm, according to https://www.apache.org/legal/resolved.html, the
> > > >>> license
> > > >>>>> "Creative Commons Attribution (CC-A) 2.5" is discussed in the
> > section
> > > >>> "HOW
> > > >>>>> SHOULD "WEAK COPYLEFT" LICENSES BE HANDLED?"
> > > >>>>>
> > > >>>>> It looks like we might have an issue but this is not clear to me
> as
> > > >>> IANAL.
> > > >>>>> I you look at the license summary
> > > >>>>> https://creativecommons.org/licenses/by/2.5/ it sure seems OK,
> but
> > > our
> > > >>>>> resolved.html has this license on a list of licenses to watch out
> > > for.
> > > >>>>>
> > > >>>>> So to be on the safe side, how do we best re-implement these? The
> > > >>>>> annotation names we can keep as is but I would imagine that we'd
> > want
> > > >>> to
> > > >>>>> re-write the Javadoc from scratch.
> > > >>>>>
> > > >>>>> Thoughts?
> > > >>>>>
> > > >>>>> Gary
> > > >>>>>
> > > >>>>>
> > > >>>>>> Jochen
> > > >>>>>>
> > > >>>>>>
> > > >>>>>> --
> > > >>>>>> The next time you hear: "Don't reinvent the wheel!"
> > > >>>>>>
> > > >>>>>> http://www.keystonedevelopment.co.uk/wp-
> content/uploads/2014/10/
> > > >>>>>> evolution-of-the-wheel-300x85.jpg
> > > >>>>>>
> > > >>>>>> ------------------------------------------------------------
> > > ---------
> > > >>>>>> 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
> > > >>>>
> > > >>>
> > > >>> ------------------------------------------------------------
> ---------
> > > >>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > >>> For additional commands, e-mail: dev-help@commons.apache.org
> > > >>>
> > > >>>
> > > >>
> > > >>
> > > >> --
> > > >> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > >> Java Persistence with Hibernate, Second Edition
> > > >> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
> b8>
> > > >>
> > > >> <http:////
> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > 1617290459>
> > > >> JUnit in Action, Second Edition
> > > >> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > >
> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> 18%22
> > > >
> > > >>
> > > >> <http:////
> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > 1935182021>
> > > >> Spring Batch in Action
> > > >> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > >> <http:////
> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > 1935182951>
> > > >> Blog: http://garygregory.wordpress.com
> > > >> Home: http://garygregory.com/
> > > >> Tweet! http://twitter.com/GaryGregory
> > > >>
> > > >
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > For additional commands, e-mail: dev-help@commons.apache.org
> > >
> > >
> >
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > Java Persistence with Hibernate, Second Edition
> > <
> > https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8
> > >
> >
> > <http:////
> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
> > JUnit in Action, Second Edition
> > <
> > https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> > >
> >
> > <http:////
> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
> > Spring Batch in Action
> > <
> > https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> > >
> > <http:////
> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
> >
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] Thread safety annotations

Posted by Benedikt Ritter <br...@apache.org>.
I agree with Oliver. I don't think we have consensus about if and how we
want to implement this. Does it even make sense to try to document this?
What value does such a documentation have, when it is wrong 50% of the
time? I just sumed up the feedback I got from one (!) user at the
conference. I think this needs more thought. This is why I suggested to
create a PR instead of committing this directly to master.

Regards.
Benedikt

Gary Gregory <ga...@gmail.com> schrieb am Di. 29. Nov. 2016 um 22:33:

> On Tue, Nov 29, 2016 at 1:12 PM, Oliver Heger <
> oliver.heger@oliver-heger.de>
> wrote:
>
> >
> >
> > Am 28.11.2016 um 22:28 schrieb Gary Gregory:
> > > WRT licensing, I re-implemented the annotations in git master. Notice
> > that
> > > all Javadocs are different and much simpler for now. Feel free to write
> > > more.
> >
> > As the length of this thread shows, using annotations for the purpose of
> > documenting thread-safety can be a controversial topic.
> >
>
> How is the length of a thread a reflection of its controversy?
>
>
> > I do not see the advantage over a plain text documentation in Javadoc.
> > Written text can even be more comprehensive.
> >
>
> One does not exclude the other. Annotations are easy to search. Text in
> Javadoc is subject to typos and formatting oddities that makes it much
> harder to search.
>
> Tools can work with annotations.
>
>
> >
> > The risk that the documentation goes out of sync with the implementation
> > is given in both scenarios. But if a class announced as thread-safe is
> > manipulated in a way that it is no longer thread-safe, I would consider
> > this as a bug. This is also a kind of backwards-incompatible change.
> >
>
> That has nothing to do with annotations. If we change behavior in some
> incompatible way, that's the bug.
>
> I can interpret what you wrote as: If I remove an @Override annotation,
> then that is backwards-incompatible change. That sounds extreme.
>
> I do not think we have talked about annotations in the context of backwards
> compatibility. Does this deserve a separate discussion?
>
> a third penny,
> Gary
>
>
> >
> > My 2 cents
> > Oliver
> >
> > >
> > > Gary
> > >
> > > On Mon, Nov 28, 2016 at 12:55 PM, Gary Gregory <garydgregory@gmail.com
> >
> > > wrote:
> > >
> > >> On Mon, Nov 28, 2016 at 12:18 PM, Matt Benson <gu...@gmail.com>
> > >> wrote:
> > >>
> > >>> I hoped to stay out of this. :) Points:
> > >>>
> > >>> * "provided" scope is another Maven mechanism that compiles against a
> > >>> given dependency but does not pull the dependency in as a runtime
> > >>> dependency. I personally prefer it to marking a dependency optional.
> > >>> * For annotations with only classfile retention, a future package
> > >>> rename e.g. lang4 would not require a consumer to upgrade just for
> the
> > >>> renamed annotation, though nothing would stop them from doing so. A
> > >>> given project could depend on either or both of lang3 and lang4 in
> any
> > >>> combination of compile-only or runtime-inclusive scope with no
> > >>> problems.
> > >>> * A standalone annotations component might be interesting, but I'm
> not
> > >>> sure if the proposed annotations constitute a critical mass adequate
> > >>> to justify it.
> > >>>
> > >>
> > >> I would have a hard time justifying a commons-lang3-annotations module
> > >> with only these 4 annotations.
> > >>
> > >> I could see having a Commons Annotations component though which for
> good
> > >> or bad would hold all annotations one could imagine having the Commons
> > >> world. Hm... it smells a bit though...
> > >>
> > >> Gary
> > >>
> > >>
> > >>>
> > >>> Matt
> > >>>
> > >>> On Mon, Nov 28, 2016 at 1:21 PM, Pascal Schumacher
> > >>> <pa...@gmx.net> wrote:
> > >>>> Groovy had to change the license of its documentation from CC-A 3.0
> to
> > >>> the
> > >>>> Apache License during incubation:
> > >>>>
> > >>>> https://issues.apache.org/jira/browse/LEGAL-167
> > >>>> http://markmail.org/message/2e7tehlwtpx625q4
> > >>>> https://issues.apache.org/jira/browse/GROOVY-7470
> > >>>>
> > >>>> So I guess Commons is probably not allowed to use these files.
> > >>>>
> > >>>>
> > >>>> Am 28.11.2016 um 18:58 schrieb Gary Gregory:
> > >>>>>
> > >>>>> On Mon, Nov 28, 2016 at 7:15 AM, Jochen Wiedmann
> > >>>>> <jo...@gmail.com>
> > >>>>> wrote:
> > >>>>>
> > >>>>>> On Mon, Nov 28, 2016 at 4:06 PM, sebb <se...@gmail.com> wrote:
> > >>>>>>
> > >>>>>>> The code would not run without the JCIP jar.
> > >>>>>>
> > >>>>>> Are there licensing issues regarding that jar?
> > >>>>>>
> > >>>>> Hm, according to https://www.apache.org/legal/resolved.html, the
> > >>> license
> > >>>>> "Creative Commons Attribution (CC-A) 2.5" is discussed in the
> section
> > >>> "HOW
> > >>>>> SHOULD "WEAK COPYLEFT" LICENSES BE HANDLED?"
> > >>>>>
> > >>>>> It looks like we might have an issue but this is not clear to me as
> > >>> IANAL.
> > >>>>> I you look at the license summary
> > >>>>> https://creativecommons.org/licenses/by/2.5/ it sure seems OK, but
> > our
> > >>>>> resolved.html has this license on a list of licenses to watch out
> > for.
> > >>>>>
> > >>>>> So to be on the safe side, how do we best re-implement these? The
> > >>>>> annotation names we can keep as is but I would imagine that we'd
> want
> > >>> to
> > >>>>> re-write the Javadoc from scratch.
> > >>>>>
> > >>>>> Thoughts?
> > >>>>>
> > >>>>> Gary
> > >>>>>
> > >>>>>
> > >>>>>> Jochen
> > >>>>>>
> > >>>>>>
> > >>>>>> --
> > >>>>>> The next time you hear: "Don't reinvent the wheel!"
> > >>>>>>
> > >>>>>> http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/
> > >>>>>> evolution-of-the-wheel-300x85.jpg
> > >>>>>>
> > >>>>>> ------------------------------------------------------------
> > ---------
> > >>>>>> 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
> > >>>>
> > >>>
> > >>> ---------------------------------------------------------------------
> > >>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > >>> For additional commands, e-mail: dev-help@commons.apache.org
> > >>>
> > >>>
> > >>
> > >>
> > >> --
> > >> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > >> Java Persistence with Hibernate, Second Edition
> > >> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> > >>
> > >> <http:////
> ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1617290459>
> > >> JUnit in Action, Second Edition
> > >> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> >
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> > >
> > >>
> > >> <http:////
> ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1935182021>
> > >> Spring Batch in Action
> > >> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > >> <http:////
> ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1935182951>
> > >> Blog: http://garygregory.wordpress.com
> > >> Home: http://garygregory.com/
> > >> Tweet! http://twitter.com/GaryGregory
> > >>
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <
> https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8
> >
>
> <http:////
> ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
> JUnit in Action, Second Edition
> <
> https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
>
> <http:////
> ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
> Spring Batch in Action
> <
> https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> >
> <http:////
> ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>

Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
On Tue, Nov 29, 2016 at 1:12 PM, Oliver Heger <ol...@oliver-heger.de>
wrote:

>
>
> Am 28.11.2016 um 22:28 schrieb Gary Gregory:
> > WRT licensing, I re-implemented the annotations in git master. Notice
> that
> > all Javadocs are different and much simpler for now. Feel free to write
> > more.
>
> As the length of this thread shows, using annotations for the purpose of
> documenting thread-safety can be a controversial topic.
>

How is the length of a thread a reflection of its controversy?


> I do not see the advantage over a plain text documentation in Javadoc.
> Written text can even be more comprehensive.
>

One does not exclude the other. Annotations are easy to search. Text in
Javadoc is subject to typos and formatting oddities that makes it much
harder to search.

Tools can work with annotations.


>
> The risk that the documentation goes out of sync with the implementation
> is given in both scenarios. But if a class announced as thread-safe is
> manipulated in a way that it is no longer thread-safe, I would consider
> this as a bug. This is also a kind of backwards-incompatible change.
>

That has nothing to do with annotations. If we change behavior in some
incompatible way, that's the bug.

I can interpret what you wrote as: If I remove an @Override annotation,
then that is backwards-incompatible change. That sounds extreme.

I do not think we have talked about annotations in the context of backwards
compatibility. Does this deserve a separate discussion?

a third penny,
Gary


>
> My 2 cents
> Oliver
>
> >
> > Gary
> >
> > On Mon, Nov 28, 2016 at 12:55 PM, Gary Gregory <ga...@gmail.com>
> > wrote:
> >
> >> On Mon, Nov 28, 2016 at 12:18 PM, Matt Benson <gu...@gmail.com>
> >> wrote:
> >>
> >>> I hoped to stay out of this. :) Points:
> >>>
> >>> * "provided" scope is another Maven mechanism that compiles against a
> >>> given dependency but does not pull the dependency in as a runtime
> >>> dependency. I personally prefer it to marking a dependency optional.
> >>> * For annotations with only classfile retention, a future package
> >>> rename e.g. lang4 would not require a consumer to upgrade just for the
> >>> renamed annotation, though nothing would stop them from doing so. A
> >>> given project could depend on either or both of lang3 and lang4 in any
> >>> combination of compile-only or runtime-inclusive scope with no
> >>> problems.
> >>> * A standalone annotations component might be interesting, but I'm not
> >>> sure if the proposed annotations constitute a critical mass adequate
> >>> to justify it.
> >>>
> >>
> >> I would have a hard time justifying a commons-lang3-annotations module
> >> with only these 4 annotations.
> >>
> >> I could see having a Commons Annotations component though which for good
> >> or bad would hold all annotations one could imagine having the Commons
> >> world. Hm... it smells a bit though...
> >>
> >> Gary
> >>
> >>
> >>>
> >>> Matt
> >>>
> >>> On Mon, Nov 28, 2016 at 1:21 PM, Pascal Schumacher
> >>> <pa...@gmx.net> wrote:
> >>>> Groovy had to change the license of its documentation from CC-A 3.0 to
> >>> the
> >>>> Apache License during incubation:
> >>>>
> >>>> https://issues.apache.org/jira/browse/LEGAL-167
> >>>> http://markmail.org/message/2e7tehlwtpx625q4
> >>>> https://issues.apache.org/jira/browse/GROOVY-7470
> >>>>
> >>>> So I guess Commons is probably not allowed to use these files.
> >>>>
> >>>>
> >>>> Am 28.11.2016 um 18:58 schrieb Gary Gregory:
> >>>>>
> >>>>> On Mon, Nov 28, 2016 at 7:15 AM, Jochen Wiedmann
> >>>>> <jo...@gmail.com>
> >>>>> wrote:
> >>>>>
> >>>>>> On Mon, Nov 28, 2016 at 4:06 PM, sebb <se...@gmail.com> wrote:
> >>>>>>
> >>>>>>> The code would not run without the JCIP jar.
> >>>>>>
> >>>>>> Are there licensing issues regarding that jar?
> >>>>>>
> >>>>> Hm, according to https://www.apache.org/legal/resolved.html, the
> >>> license
> >>>>> "Creative Commons Attribution (CC-A) 2.5" is discussed in the section
> >>> "HOW
> >>>>> SHOULD "WEAK COPYLEFT" LICENSES BE HANDLED?"
> >>>>>
> >>>>> It looks like we might have an issue but this is not clear to me as
> >>> IANAL.
> >>>>> I you look at the license summary
> >>>>> https://creativecommons.org/licenses/by/2.5/ it sure seems OK, but
> our
> >>>>> resolved.html has this license on a list of licenses to watch out
> for.
> >>>>>
> >>>>> So to be on the safe side, how do we best re-implement these? The
> >>>>> annotation names we can keep as is but I would imagine that we'd want
> >>> to
> >>>>> re-write the Javadoc from scratch.
> >>>>>
> >>>>> Thoughts?
> >>>>>
> >>>>> Gary
> >>>>>
> >>>>>
> >>>>>> Jochen
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> The next time you hear: "Don't reinvent the wheel!"
> >>>>>>
> >>>>>> http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/
> >>>>>> evolution-of-the-wheel-300x85.jpg
> >>>>>>
> >>>>>> ------------------------------------------------------------
> ---------
> >>>>>> 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
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >>> For additional commands, e-mail: dev-help@commons.apache.org
> >>>
> >>>
> >>
> >>
> >> --
> >> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >> Java Persistence with Hibernate, Second Edition
> >> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> >>
> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> >> JUnit in Action, Second Edition
> >> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
> >>
> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> >> Spring Batch in Action
> >> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> >> Blog: http://garygregory.wordpress.com
> >> Home: http://garygregory.com/
> >> Tweet! http://twitter.com/GaryGregory
> >>
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] Thread safety annotations

Posted by Oliver Heger <ol...@oliver-heger.de>.

Am 28.11.2016 um 22:28 schrieb Gary Gregory:
> WRT licensing, I re-implemented the annotations in git master. Notice that
> all Javadocs are different and much simpler for now. Feel free to write
> more.

As the length of this thread shows, using annotations for the purpose of
documenting thread-safety can be a controversial topic.

I do not see the advantage over a plain text documentation in Javadoc.
Written text can even be more comprehensive.

The risk that the documentation goes out of sync with the implementation
is given in both scenarios. But if a class announced as thread-safe is
manipulated in a way that it is no longer thread-safe, I would consider
this as a bug. This is also a kind of backwards-incompatible change.

My 2 cents
Oliver

> 
> Gary
> 
> On Mon, Nov 28, 2016 at 12:55 PM, Gary Gregory <ga...@gmail.com>
> wrote:
> 
>> On Mon, Nov 28, 2016 at 12:18 PM, Matt Benson <gu...@gmail.com>
>> wrote:
>>
>>> I hoped to stay out of this. :) Points:
>>>
>>> * "provided" scope is another Maven mechanism that compiles against a
>>> given dependency but does not pull the dependency in as a runtime
>>> dependency. I personally prefer it to marking a dependency optional.
>>> * For annotations with only classfile retention, a future package
>>> rename e.g. lang4 would not require a consumer to upgrade just for the
>>> renamed annotation, though nothing would stop them from doing so. A
>>> given project could depend on either or both of lang3 and lang4 in any
>>> combination of compile-only or runtime-inclusive scope with no
>>> problems.
>>> * A standalone annotations component might be interesting, but I'm not
>>> sure if the proposed annotations constitute a critical mass adequate
>>> to justify it.
>>>
>>
>> I would have a hard time justifying a commons-lang3-annotations module
>> with only these 4 annotations.
>>
>> I could see having a Commons Annotations component though which for good
>> or bad would hold all annotations one could imagine having the Commons
>> world. Hm... it smells a bit though...
>>
>> Gary
>>
>>
>>>
>>> Matt
>>>
>>> On Mon, Nov 28, 2016 at 1:21 PM, Pascal Schumacher
>>> <pa...@gmx.net> wrote:
>>>> Groovy had to change the license of its documentation from CC-A 3.0 to
>>> the
>>>> Apache License during incubation:
>>>>
>>>> https://issues.apache.org/jira/browse/LEGAL-167
>>>> http://markmail.org/message/2e7tehlwtpx625q4
>>>> https://issues.apache.org/jira/browse/GROOVY-7470
>>>>
>>>> So I guess Commons is probably not allowed to use these files.
>>>>
>>>>
>>>> Am 28.11.2016 um 18:58 schrieb Gary Gregory:
>>>>>
>>>>> On Mon, Nov 28, 2016 at 7:15 AM, Jochen Wiedmann
>>>>> <jo...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> On Mon, Nov 28, 2016 at 4:06 PM, sebb <se...@gmail.com> wrote:
>>>>>>
>>>>>>> The code would not run without the JCIP jar.
>>>>>>
>>>>>> Are there licensing issues regarding that jar?
>>>>>>
>>>>> Hm, according to https://www.apache.org/legal/resolved.html, the
>>> license
>>>>> "Creative Commons Attribution (CC-A) 2.5" is discussed in the section
>>> "HOW
>>>>> SHOULD "WEAK COPYLEFT" LICENSES BE HANDLED?"
>>>>>
>>>>> It looks like we might have an issue but this is not clear to me as
>>> IANAL.
>>>>> I you look at the license summary
>>>>> https://creativecommons.org/licenses/by/2.5/ it sure seems OK, but our
>>>>> resolved.html has this license on a list of licenses to watch out for.
>>>>>
>>>>> So to be on the safe side, how do we best re-implement these? The
>>>>> annotation names we can keep as is but I would imagine that we'd want
>>> to
>>>>> re-write the Javadoc from scratch.
>>>>>
>>>>> Thoughts?
>>>>>
>>>>> Gary
>>>>>
>>>>>
>>>>>> Jochen
>>>>>>
>>>>>>
>>>>>> --
>>>>>> The next time you hear: "Don't reinvent the wheel!"
>>>>>>
>>>>>> http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/
>>>>>> evolution-of-the-wheel-300x85.jpg
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> 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
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>>
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> Java Persistence with Hibernate, Second Edition
>> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>>
>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
>> JUnit in Action, Second Edition
>> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>
>>
>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
>> Spring Batch in Action
>> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
> 
> 
> 

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


Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
WRT licensing, I re-implemented the annotations in git master. Notice that
all Javadocs are different and much simpler for now. Feel free to write
more.

Gary

On Mon, Nov 28, 2016 at 12:55 PM, Gary Gregory <ga...@gmail.com>
wrote:

> On Mon, Nov 28, 2016 at 12:18 PM, Matt Benson <gu...@gmail.com>
> wrote:
>
>> I hoped to stay out of this. :) Points:
>>
>> * "provided" scope is another Maven mechanism that compiles against a
>> given dependency but does not pull the dependency in as a runtime
>> dependency. I personally prefer it to marking a dependency optional.
>> * For annotations with only classfile retention, a future package
>> rename e.g. lang4 would not require a consumer to upgrade just for the
>> renamed annotation, though nothing would stop them from doing so. A
>> given project could depend on either or both of lang3 and lang4 in any
>> combination of compile-only or runtime-inclusive scope with no
>> problems.
>> * A standalone annotations component might be interesting, but I'm not
>> sure if the proposed annotations constitute a critical mass adequate
>> to justify it.
>>
>
> I would have a hard time justifying a commons-lang3-annotations module
> with only these 4 annotations.
>
> I could see having a Commons Annotations component though which for good
> or bad would hold all annotations one could imagine having the Commons
> world. Hm... it smells a bit though...
>
> Gary
>
>
>>
>> Matt
>>
>> On Mon, Nov 28, 2016 at 1:21 PM, Pascal Schumacher
>> <pa...@gmx.net> wrote:
>> > Groovy had to change the license of its documentation from CC-A 3.0 to
>> the
>> > Apache License during incubation:
>> >
>> > https://issues.apache.org/jira/browse/LEGAL-167
>> > http://markmail.org/message/2e7tehlwtpx625q4
>> > https://issues.apache.org/jira/browse/GROOVY-7470
>> >
>> > So I guess Commons is probably not allowed to use these files.
>> >
>> >
>> > Am 28.11.2016 um 18:58 schrieb Gary Gregory:
>> >>
>> >> On Mon, Nov 28, 2016 at 7:15 AM, Jochen Wiedmann
>> >> <jo...@gmail.com>
>> >> wrote:
>> >>
>> >>> On Mon, Nov 28, 2016 at 4:06 PM, sebb <se...@gmail.com> wrote:
>> >>>
>> >>>> The code would not run without the JCIP jar.
>> >>>
>> >>> Are there licensing issues regarding that jar?
>> >>>
>> >> Hm, according to https://www.apache.org/legal/resolved.html, the
>> license
>> >> "Creative Commons Attribution (CC-A) 2.5" is discussed in the section
>> "HOW
>> >> SHOULD "WEAK COPYLEFT" LICENSES BE HANDLED?"
>> >>
>> >> It looks like we might have an issue but this is not clear to me as
>> IANAL.
>> >> I you look at the license summary
>> >> https://creativecommons.org/licenses/by/2.5/ it sure seems OK, but our
>> >> resolved.html has this license on a list of licenses to watch out for.
>> >>
>> >> So to be on the safe side, how do we best re-implement these? The
>> >> annotation names we can keep as is but I would imagine that we'd want
>> to
>> >> re-write the Javadoc from scratch.
>> >>
>> >> Thoughts?
>> >>
>> >> Gary
>> >>
>> >>
>> >>> Jochen
>> >>>
>> >>>
>> >>> --
>> >>> The next time you hear: "Don't reinvent the wheel!"
>> >>>
>> >>> http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/
>> >>> evolution-of-the-wheel-300x85.jpg
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> 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
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
On Mon, Nov 28, 2016 at 12:18 PM, Matt Benson <gu...@gmail.com> wrote:

> I hoped to stay out of this. :) Points:
>
> * "provided" scope is another Maven mechanism that compiles against a
> given dependency but does not pull the dependency in as a runtime
> dependency. I personally prefer it to marking a dependency optional.
> * For annotations with only classfile retention, a future package
> rename e.g. lang4 would not require a consumer to upgrade just for the
> renamed annotation, though nothing would stop them from doing so. A
> given project could depend on either or both of lang3 and lang4 in any
> combination of compile-only or runtime-inclusive scope with no
> problems.
> * A standalone annotations component might be interesting, but I'm not
> sure if the proposed annotations constitute a critical mass adequate
> to justify it.
>

I would have a hard time justifying a commons-lang3-annotations module with
only these 4 annotations.

I could see having a Commons Annotations component though which for good or
bad would hold all annotations one could imagine having the Commons world.
Hm... it smells a bit though...

Gary


>
> Matt
>
> On Mon, Nov 28, 2016 at 1:21 PM, Pascal Schumacher
> <pa...@gmx.net> wrote:
> > Groovy had to change the license of its documentation from CC-A 3.0 to
> the
> > Apache License during incubation:
> >
> > https://issues.apache.org/jira/browse/LEGAL-167
> > http://markmail.org/message/2e7tehlwtpx625q4
> > https://issues.apache.org/jira/browse/GROOVY-7470
> >
> > So I guess Commons is probably not allowed to use these files.
> >
> >
> > Am 28.11.2016 um 18:58 schrieb Gary Gregory:
> >>
> >> On Mon, Nov 28, 2016 at 7:15 AM, Jochen Wiedmann
> >> <jo...@gmail.com>
> >> wrote:
> >>
> >>> On Mon, Nov 28, 2016 at 4:06 PM, sebb <se...@gmail.com> wrote:
> >>>
> >>>> The code would not run without the JCIP jar.
> >>>
> >>> Are there licensing issues regarding that jar?
> >>>
> >> Hm, according to https://www.apache.org/legal/resolved.html, the
> license
> >> "Creative Commons Attribution (CC-A) 2.5" is discussed in the section
> "HOW
> >> SHOULD "WEAK COPYLEFT" LICENSES BE HANDLED?"
> >>
> >> It looks like we might have an issue but this is not clear to me as
> IANAL.
> >> I you look at the license summary
> >> https://creativecommons.org/licenses/by/2.5/ it sure seems OK, but our
> >> resolved.html has this license on a list of licenses to watch out for.
> >>
> >> So to be on the safe side, how do we best re-implement these? The
> >> annotation names we can keep as is but I would imagine that we'd want to
> >> re-write the Javadoc from scratch.
> >>
> >> Thoughts?
> >>
> >> Gary
> >>
> >>
> >>> Jochen
> >>>
> >>>
> >>> --
> >>> The next time you hear: "Don't reinvent the wheel!"
> >>>
> >>> http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/
> >>> evolution-of-the-wheel-300x85.jpg
> >>>
> >>> ---------------------------------------------------------------------
> >>> 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
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] Thread safety annotations

Posted by Matt Benson <gu...@gmail.com>.
I hoped to stay out of this. :) Points:

* "provided" scope is another Maven mechanism that compiles against a
given dependency but does not pull the dependency in as a runtime
dependency. I personally prefer it to marking a dependency optional.
* For annotations with only classfile retention, a future package
rename e.g. lang4 would not require a consumer to upgrade just for the
renamed annotation, though nothing would stop them from doing so. A
given project could depend on either or both of lang3 and lang4 in any
combination of compile-only or runtime-inclusive scope with no
problems.
* A standalone annotations component might be interesting, but I'm not
sure if the proposed annotations constitute a critical mass adequate
to justify it.

Matt

On Mon, Nov 28, 2016 at 1:21 PM, Pascal Schumacher
<pa...@gmx.net> wrote:
> Groovy had to change the license of its documentation from CC-A 3.0 to the
> Apache License during incubation:
>
> https://issues.apache.org/jira/browse/LEGAL-167
> http://markmail.org/message/2e7tehlwtpx625q4
> https://issues.apache.org/jira/browse/GROOVY-7470
>
> So I guess Commons is probably not allowed to use these files.
>
>
> Am 28.11.2016 um 18:58 schrieb Gary Gregory:
>>
>> On Mon, Nov 28, 2016 at 7:15 AM, Jochen Wiedmann
>> <jo...@gmail.com>
>> wrote:
>>
>>> On Mon, Nov 28, 2016 at 4:06 PM, sebb <se...@gmail.com> wrote:
>>>
>>>> The code would not run without the JCIP jar.
>>>
>>> Are there licensing issues regarding that jar?
>>>
>> Hm, according to https://www.apache.org/legal/resolved.html, the license
>> "Creative Commons Attribution (CC-A) 2.5" is discussed in the section "HOW
>> SHOULD "WEAK COPYLEFT" LICENSES BE HANDLED?"
>>
>> It looks like we might have an issue but this is not clear to me as IANAL.
>> I you look at the license summary
>> https://creativecommons.org/licenses/by/2.5/ it sure seems OK, but our
>> resolved.html has this license on a list of licenses to watch out for.
>>
>> So to be on the safe side, how do we best re-implement these? The
>> annotation names we can keep as is but I would imagine that we'd want to
>> re-write the Javadoc from scratch.
>>
>> Thoughts?
>>
>> Gary
>>
>>
>>> Jochen
>>>
>>>
>>> --
>>> The next time you hear: "Don't reinvent the wheel!"
>>>
>>> http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/
>>> evolution-of-the-wheel-300x85.jpg
>>>
>>> ---------------------------------------------------------------------
>>> 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
>

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


Re: [lang] Thread safety annotations

Posted by Pascal Schumacher <pa...@gmx.net>.
Groovy had to change the license of its documentation from CC-A 3.0 to 
the Apache License during incubation:

https://issues.apache.org/jira/browse/LEGAL-167
http://markmail.org/message/2e7tehlwtpx625q4
https://issues.apache.org/jira/browse/GROOVY-7470

So I guess Commons is probably not allowed to use these files.

Am 28.11.2016 um 18:58 schrieb Gary Gregory:
> On Mon, Nov 28, 2016 at 7:15 AM, Jochen Wiedmann <jo...@gmail.com>
> wrote:
>
>> On Mon, Nov 28, 2016 at 4:06 PM, sebb <se...@gmail.com> wrote:
>>
>>> The code would not run without the JCIP jar.
>> Are there licensing issues regarding that jar?
>>
> Hm, according to https://www.apache.org/legal/resolved.html, the license
> "Creative Commons Attribution (CC-A) 2.5" is discussed in the section "HOW
> SHOULD "WEAK COPYLEFT" LICENSES BE HANDLED?"
>
> It looks like we might have an issue but this is not clear to me as IANAL.
> I you look at the license summary
> https://creativecommons.org/licenses/by/2.5/ it sure seems OK, but our
> resolved.html has this license on a list of licenses to watch out for.
>
> So to be on the safe side, how do we best re-implement these? The
> annotation names we can keep as is but I would imagine that we'd want to
> re-write the Javadoc from scratch.
>
> Thoughts?
>
> Gary
>
>
>> Jochen
>>
>>
>> --
>> The next time you hear: "Don't reinvent the wheel!"
>>
>> http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/
>> evolution-of-the-wheel-300x85.jpg
>>
>> ---------------------------------------------------------------------
>> 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


Re: [lang] Thread safety annotations

Posted by Gilles <gi...@harfang.homelinux.org>.
On Mon, 28 Nov 2016 14:12:48 +0100, Jochen Wiedmann wrote:
> On Mon, Nov 28, 2016 at 12:08 PM, sebb <se...@gmail.com> wrote:
>
>> No, I'm suggesting that the annotations become an independent 
>> Commons component.
>> If we don't want these used outside Commons (probably a good idea)
>> then we can make this clear through Javadoc and package naming etc.
>>
>> The alternative is to add them to every component as and when they
>> want to use them.
>> And again, we should probably try to prevent them being used 
>> externally.
>>
>> My position is that only adding them to LANG is not the best 
>> solution.
>
> Okay, but do we really need yet another component? I'd suggest, that 
> a
> separate jar file (for example commons-lang-annotations) would be
> sufficient, and fulfills your goals.

Anyone noticing that this is the situation which the post
  "Version number(s) for modular components"
addresses?

It makes sense to develop this feature within the [lang] project,
in module "commons-lang-annotations" as suggested above.

It does not make sense to release a new version of an unchanged
"commons-lang-annotations" JAR, every time there is a release of
"Commons Lang".


Gilles

>
> Jochen
>
>


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


Re: [lang] Thread safety annotations

Posted by Jochen Wiedmann <jo...@gmail.com>.
On Mon, Nov 28, 2016 at 4:13 PM, sebb <se...@gmail.com> wrote:

> Either you have to allow a separate release cycle for that jar.
> Or you have to release a new version of the jar with every LANG release.
> The content will likely be identical for each one unless the Javadoc is tweaked.


I'd strongly recommend the former, but I'm fine with both. I just try
to avoid adding a new component, wgen a separate jar would clearly
suffice (My opinion).

Jochen

-- 
The next time you hear: "Don't reinvent the wheel!"

http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg

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


Re: [lang] Thread safety annotations

Posted by sebb <se...@gmail.com>.
On 28 November 2016 at 13:12, Jochen Wiedmann <jo...@gmail.com> wrote:
> On Mon, Nov 28, 2016 at 12:08 PM, sebb <se...@gmail.com> wrote:
>
>> No, I'm suggesting that the annotations become an independent Commons component.
>> If we don't want these used outside Commons (probably a good idea)
>> then we can make this clear through Javadoc and package naming etc.
>>
>> The alternative is to add them to every component as and when they
>> want to use them.
>> And again, we should probably try to prevent them being used externally.
>>
>> My position is that only adding them to LANG is not the best solution.
>
> Okay, but do we really need yet another component? I'd suggest, that a
> separate jar file (for example commons-lang-annotations) would be
> sufficient, and fulfills your goals.

Either you have to allow a separate release cycle for that jar.
Or you have to release a new version of the jar with every LANG release.
The content will likely be identical for each one unless the Javadoc is tweaked.

Also if it uses the lang package name convention, would the package
name be changed with non-BC releases?
That would be annoying for downstream users.
If it does not use the LANG package naming, why is it bundled with LANG?

Maybe that does not matter, but it seems a bit silly to me when one
could release a stand-alone jar.
The annotations jar has much more in common with the build plugin than
a component.
We don't insist on bundling the build plugin with another component.

> Jochen
>
>
> http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg
>
> ---------------------------------------------------------------------
> 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


Re: [lang] Thread safety annotations

Posted by Jochen Wiedmann <jo...@gmail.com>.
On Mon, Nov 28, 2016 at 12:08 PM, sebb <se...@gmail.com> wrote:

> No, I'm suggesting that the annotations become an independent Commons component.
> If we don't want these used outside Commons (probably a good idea)
> then we can make this clear through Javadoc and package naming etc.
>
> The alternative is to add them to every component as and when they
> want to use them.
> And again, we should probably try to prevent them being used externally.
>
> My position is that only adding them to LANG is not the best solution.

Okay, but do we really need yet another component? I'd suggest, that a
separate jar file (for example commons-lang-annotations) would be
sufficient, and fulfills your goals.

Jochen


http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg

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


Re: [lang] Thread safety annotations

Posted by sebb <se...@gmail.com>.
On 28 November 2016 at 01:55, Gary Gregory <ga...@gmail.com> wrote:
> Are you suggesting [lang] becomes a multi-module project?

No, I'm suggesting that the annotations become an independent Commons component.
If we don't want these used outside Commons (probably a good idea)
then we can make this clear through Javadoc and package naming etc.

The alternative is to add them to every component as and when they
want to use them.
And again, we should probably try to prevent them being used externally.

My position is that only adding them to LANG is not the best solution.

> Gary
>
> On Nov 27, 2016 5:01 PM, "sebb" <se...@gmail.com> wrote:
>
>> On 28 November 2016 at 00:11, Gary Gregory <ga...@gmail.com> wrote:
>> > On Sun, Nov 27, 2016 at 4:09 PM, sebb <se...@gmail.com> wrote:
>> >
>> >> On 27 November 2016 at 23:51, Gary Gregory <ga...@gmail.com>
>> wrote:
>> >> > On Sun, Nov 27, 2016 at 3:41 PM, sebb <se...@gmail.com> wrote:
>> >> >
>> >> >> On 27 November 2016 at 22:31, Gary Gregory <ga...@gmail.com>
>> >> wrote:
>> >> >> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <se...@gmail.com> wrote:
>> >> >> >
>> >> >> >> On 27 November 2016 at 22:03, Gary Gregory <
>> garydgregory@gmail.com>
>> >> >> wrote:
>> >> >> >> > These annotations are the SAME as have been published all over
>> the
>> >> >> place,
>> >> >> >> > so I do not think we need a PR for review. Reviewing the code in
>> >> the
>> >> >> repo
>> >> >> >> > should be enough, but I'm not sure _what_ there is to review
>> >> really.
>> >> >> I've
>> >> >> >> > already posted a link to the sources (a pastebin link). I'll
>> >> create a
>> >> >> >> Jira
>> >> >> >> > of course.
>> >> >> >>
>> >> >> >> There is one aspect that needs review: does the annotation belong
>> in
>> >> >> LANG?
>> >> >> >> If we want to use the annotation in other components, do they
>> have to
>> >> >> >> depend on LANG?
>> >> >> >>
>> >> >> >
>> >> >> > No see below and previous messages.
>> >> >> >
>> >> >> >
>> >> >> >> If not, do they all have their own copies?
>> >> >> >>
>> >> >> >
>> >> >> > No.
>> >> >> >
>> >> >> >
>> >> >> >>
>> >> >> >> And what happens when LANG needs a non-BC release?
>> >> >> >>
>> >> >> >
>> >> >> > What is the issue I am missing?
>> >> >> >
>> >> >>
>> >> >> The package name for the annotation might need to change
>> >> >> That would be a downstream nuisance.
>> >> >>
>> >> >
>> >> > Hi All,
>> >> >
>> >> > How is that different than changing the package name for any of our
>> other
>> >> > lang types?
>> >>
>> >> It's not.
>> >>
>> >> > If you want move a package, you have to break BC and we have clear
>> >> > guidelines for that task.
>> >>
>> >> But why should I have to change package imports for annotations just
>> >> because they happen to be in LANG?
>> >>
>> >> Note that this could get confusing.
>> >>
>> >> Say XYZ component starts out only needing lang for the annotations.
>> >> So they include LANG 3.x and code the annotations.
>> >>
>> >> Later they find they want LANG 4.x for runtime.
>> >> They would then need to drop the LANG 3.x dependency, fix up all the
>> >> annotation imports etc.
>> >> Unnecessary work if the annotations were in a separate component.
>> >>
>> >> Also, any tool that wants to check the annotations will have to look
>> >> for them in lots of packages.
>> >>
>> >> Whilst it can no doubt be made to work, it's going to cause problems
>> later.
>> >>
>> >
>> > To be on the playful side, this is what my mother calls "borrowing
>> trouble"
>> > ;-)
>> >
>> > We can future-trip ourselves in all sorts of troubles. Our imaginations
>> > know no bounds!  :-)
>>
>> This is not an imaginary scenario.
>>
>> We know that LANG will have a non-BC release at some point.
>> The plan is to allow non-LANG components to share the LANG annotations.
>> We know that components which originally don't need LANG may end up
>> needing LANG at run-time.
>> Therefore the problem will occur.
>>
>> In this case, "look before you leap" is appropriate.
>>
>> > Gary
>> >
>> >
>> >>
>> >> > Since already have a package called org.apache.commons.lang3.
>> concurrent,
>> >> I
>> >> > propose we place these annottaions in
>> >> > org.apache.commons.lang3.concurrent.annotation.
>> >> >
>> >> >
>> >> >> >>
>> >> >> >> My expectation for such annotations is that they would be
>> >> >> >> self-contained (or built-in to the languange, not LANG).
>> >> >> >>
>> >> >> >
>> >> >> > It is _because_ they are NOT built-in the language or JRE that we
>> are
>> >> >> > proposing they belong in [lang].
>> >> >> >
>> >> >> > Since we are providing the annotation with CLASS retention only
>> >> >> > (initially), there is no hard dependency on [lang] at runtime.
>> >> >> >
>> >> >> > Is there some subtlety we are missing?
>> >> >>
>> >> >> Yes, the compile-time dependency.
>> >> >>
>> >> >
>> >> > No surprise, right? You can't use an annotation without compiling the
>> >> > source file.
>> >> >
>> >> >
>> >> >> AFAIK it's not possible to have a Maven compile-only dependency;
>> >> >> compile-time implies run-time.
>> >> >>
>> >> >
>> >> > That's a tooling issue of course which should not invalidate the
>> >> worthiness
>> >> > of this feature.
>> >> >
>> >> > If I am a downstream user of Commons Lang's new annotations, I would
>> >> need a
>> >> > Maven scope that says "I need [lang] as a compile time only
>> dependency" I
>> >> > do not see such a scope on
>> >> > https://maven.apache.org/guides/introduction/
>> introduction-to-dependency-
>> >> mechanism.html#Dependency_Scope
>> >> >
>> >> > Time for a Jira!
>> >> >
>> >> > I wonder what Gradle offers users in this dept.?
>> >> >
>> >> > Gary
>> >> >
>> >> >
>> >> >>
>> >> >> > Gary
>> >> >> >
>> >> >> >
>> >> >> >> > Gary
>> >> >> >> >
>> >> >> >> > On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <
>> >> britter@apache.org>
>> >> >> >> wrote:
>> >> >> >> >
>> >> >> >> >> Hi,
>> >> >> >> >>
>> >> >> >> >> Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov.
>> >> 2016
>> >> >> um
>> >> >> >> >> 21:01 Uhr:
>> >> >> >> >>
>> >> >> >> >> > So let's start with the CLASS retention annotations first.
>> I'll
>> >> >> commit
>> >> >> >> >> > later today.
>> >> >> >> >> >
>> >> >> >> >>
>> >> >> >> >> Maybe create a GitHub PR so people can have a look before it
>> goes
>> >> to
>> >> >> >> >> master?
>> >> >> >> >>
>> >> >> >> >> Benedikt
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> >
>> >> >> >> >> > Gary
>> >> >> >> >> >
>> >> >> >> >> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <bo...@gmail.com>
>> >> wrote:
>> >> >> >> >> >
>> >> >> >> >> > > I feel like documenting thread safety in such a low level,
>> >> widely
>> >> >> >> used
>> >> >> >> >> > > library like [lang] is a great idea. Whether it uses
>> >> annotations,
>> >> >> >> >> > javadocs,
>> >> >> >> >> > > or some sort of informal javadoc comments isn't too big a
>> >> deal to
>> >> >> >> me,
>> >> >> >> >> but
>> >> >> >> >> > > providing some guarantees of thread safety or lack thereof
>> >> would
>> >> >> be
>> >> >> >> >> > > invaluable information.
>> >> >> >> >> > >
>> >> >> >> >> > > On 27 November 2016 at 07:11, Benedikt Ritter <
>> >> >> britter@apache.org>
>> >> >> >> >> > wrote:
>> >> >> >> >> > >
>> >> >> >> >> > > > I thought we decided to abstain from documenting thread
>> >> safety
>> >> >> >> since
>> >> >> >> >> it
>> >> >> >> >> > > > would get outdated quickly anyway.
>> >> >> >> >> > > >
>> >> >> >> >> > > > Gary Gregory <ga...@gmail.com> schrieb am So.,
>> 27.
>> >> Nov.
>> >> >> >> 2016
>> >> >> >> >> um
>> >> >> >> >> > > > 09:11 Uhr:
>> >> >> >> >> > > >
>> >> >> >> >> > > > > But if we then want a runtime version we had an odd
>> >> packaging
>> >> >> >> with
>> >> >> >> >> > > CLASS
>> >> >> >> >> > > > > retention in .concurrent. and RUNTIME in
>> >> .concurrent.runtime.
>> >> >> >> >> > > > >
>> >> >> >> >> > > > > I might be in YAGNI territory here...
>> >> >> >> >> > > > >
>> >> >> >> >> > > > > Gary
>> >> >> >> >> > > > >
>> >> >> >> >> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <
>> >> >> boards@gmail.com
>> >> >> >> >
>> >> >> >> >> > > wrote:
>> >> >> >> >> > > > >
>> >> >> >> >> > > > > > I think adding the additional clazz/runtime package
>> >> would
>> >> >> be a
>> >> >> >> >> > little
>> >> >> >> >> > > > > > overkill if you only include one packaging option for
>> >> now.
>> >> >> >> >> > > > > >
>> >> >> >> >> > > > > > On 27 November 2016 at 00:04, Gary Gregory <
>> >> >> >> >> garydgregory@gmail.com
>> >> >> >> >> > >
>> >> >> >> >> > > > > wrote:
>> >> >> >> >> > > > > >
>> >> >> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <
>> >> boards@gmail.com
>> >> >> >
>> >> >> >> >> wrote:
>> >> >> >> >> > > > > > > >
>> >> >> >> >> > > > > > > > I can think of a couple use cases for runtime
>> >> retention
>> >> >> >> for
>> >> >> >> >> > > thread
>> >> >> >> >> > > > > > safety
>> >> >> >> >> > > > > > > > annotations, but they're not specific to commons
>> >> lang.
>> >> >> >> >> > > > > > > >
>> >> >> >> >> > > > > > > > 1. A framework could choose what type of data
>> >> >> structure or
>> >> >> >> >> > > > algorithm
>> >> >> >> >> > > > > to
>> >> >> >> >> > > > > > > use
>> >> >> >> >> > > > > > > > at runtime based on the presence of which thread
>> >> safety
>> >> >> >> >> > > annotation
>> >> >> >> >> > > > is
>> >> >> >> >> > > > > > on.
>> >> >> >> >> > > > > > > > Same for mutability.
>> >> >> >> >> > > > > > > > 2. A testing framework could use these
>> annotations
>> >> to
>> >> >> try
>> >> >> >> and
>> >> >> >> >> > > > > automate
>> >> >> >> >> > > > > > > some
>> >> >> >> >> > > > > > > > sort of thread safety tests, though that sounds
>> >> like a
>> >> >> >> hard
>> >> >> >> >> > > problem
>> >> >> >> >> > > > > to
>> >> >> >> >> > > > > > > > actually implement.
>> >> >> >> >> > > > > > > >
>> >> >> >> >> > > > > > > > However, it'd be easier to just start with class
>> >> >> retention
>> >> >> >> >> (or
>> >> >> >> >> > > > source
>> >> >> >> >> > > > > > > > retention) just for documentation purposes.
>> Higher
>> >> >> >> retention
>> >> >> >> >> > > levels
>> >> >> >> >> > > > > > could
>> >> >> >> >> > > > > > > > be added later if an important use case came up.
>> >> >> >> >> > > > > > >
>> >> >> >> >> > > > > > > But which packaging option?
>> >> >> >> >> > > > > > >
>> >> >> >> >> > > > > > > Gary
>> >> >> >> >> > > > > > > >
>> >> >> >> >> > > > > > > > On 26 November 2016 at 19:56, Gary Gregory <
>> >> >> >> >> > > garydgregory@gmail.com
>> >> >> >> >> > > > >
>> >> >> >> >> > > > > > > wrote:
>> >> >> >> >> > > > > > > >
>> >> >> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <
>> >> >> sebbaz@gmail.com
>> >> >> >> >
>> >> >> >> >> > > wrote:
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
>> >> >> >> >> > > > > garydgregory@gmail.com
>> >> >> >> >> > > > > > >
>> >> >> >> >> > > > > > > > > wrote:
>> >> >> >> >> > > > > > > > > > > On a [crypto] thread, I mentioned
>> >> >> >> >> > > > http://pastebin.com/RKPGGdJ9
>> >> >> >> >> > > > > > to
>> >> >> >> >> > > > > > > add
>> >> >> >> >> > > > > > > > > > the
>> >> >> >> >> > > > > > > > > > > "classic" four javax.annotation.concurrent
>> >> >> >> annotations
>> >> >> >> >> to
>> >> >> >> >> > > two
>> >> >> >> >> > > > > > > packages
>> >> >> >> >> > > > > > > > > > > (.clazz and .runtime) in Commons Lang for
>> >> CLASS
>> >> >> and
>> >> >> >> >> > RUNTIME
>> >> >> >> >> > > > > > > retentions.
>> >> >> >> >> > > > > > > > > > >
>> >> >> >> >> > > > > > > > > > > You'd use the CLASS version to avoid a hard
>> >> >> >> dependency
>> >> >> >> >> on
>> >> >> >> >> > > > > [lang].
>> >> >> >> >> > > > > > > > > RUNTIME
>> >> >> >> >> > > > > > > > > > > to keep them around.
>> >> >> >> >> > > > > > > > > > >
>> >> >> >> >> > > > > > > > > > > We'd use the CLASS versions in all of
>> Commons
>> >> for
>> >> >> >> >> > > documenting
>> >> >> >> >> > > > > > > thread
>> >> >> >> >> > > > > > > > > > safety.
>> >> >> >> >> > > > > > > > > > >
>> >> >> >> >> > > > > > > > > > > Thoughts?
>> >> >> >> >> > > > > > > > > >
>> >> >> >> >> > > > > > > > > > Definitely Class retention, not Runtime.
>> >> >> >> >> > > > > > > > > > You don't want to have to include the
>> annotation
>> >> >> jar
>> >> >> >> on
>> >> >> >> >> the
>> >> >> >> >> > > > > runtime
>> >> >> >> >> > > > > > > > > > classpath.
>> >> >> >> >> > > > > > > > > >
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > > > Hi Sebb,
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > > > Right now I have both of these packages:
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
>> >> >> annotation.concurrent.clazz
>> >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
>> >> >> >> annotation.concurrent.runtime
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > > > Each with a copy of:
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > > > GuardedBy
>> >> >> >> >> > > > > > > > > Immutable
>> >> >> >> >> > > > > > > > > NotThreadSafe
>> >> >> >> >> > > > > > > > > ThreadSafe
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > > > Should we include what I have as is?
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > > > If we were to only provide the annotation at
>> the
>> >> >> CLASS
>> >> >> >> >> > > retention
>> >> >> >> >> > > > > > level,
>> >> >> >> >> > > > > > > > > should we still package them in
>> >> >> >> >> > ...annotation.concurrent.clazz
>> >> >> >> >> > > in
>> >> >> >> >> > > > > > case
>> >> >> >> >> > > > > > > we
>> >> >> >> >> > > > > > > > > want to provide annotation.concurrent.runtime
>> >> later?
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > > > If we know for certain we never want to provide
>> >> >> RUNTIME
>> >> >> >> >> > > > retention,
>> >> >> >> >> > > > > we
>> >> >> >> >> > > > > > > can
>> >> >> >> >> > > > > > > > > put them all in annotation.concurrent now.
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > > > Thoughts?
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > > > Gary
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > > > > [I don't know why the annotations were ever
>> >> >> considered
>> >> >> >> >> > > suitable
>> >> >> >> >> > > > > for
>> >> >> >> >> > > > > > > > > > runtime]
>> >> >> >> >> > > > > > > > > >
>> >> >> >> >> > > > > > > > > > > Gary
>> >> >> >> >> > > > > > > > > > >
>> >> >> >> >> > > > > > > > > > > --
>> >> >> >> >> > > > > > > > > > > E-Mail: garydgregory@gmail.com |
>> >> >> >> ggregory@apache.org
>> >> >> >> >> > > > > > > > > > > Java Persistence with Hibernate, Second
>> >> Edition
>> >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
>> >> >> >> >> product/1617290459/ref=as_li_
>> >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> >> >> 9325&creativeASIN=1617290459&
>> >> >> >> >> > > > > > > > > >
>> >> >> >> >> > > > > > >
>> >> >> >> >> > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2
>> >> >> >> >> > > b8>
>> >> >> >> >> > > > > > > > > > >
>> >> >> >> >> > > > > > > > > > > <http:////
>> >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
>> >> >> ir?t=garygregory-20&l=am2&o=1&
>> >> >> >> a=
>> >> >> >> >> > > > > > > > > > 1617290459>
>> >> >> >> >> > > > > > > > > > > JUnit in Action, Second Edition
>> >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
>> >> >> >> >> product/1935182021/ref=as_li_
>> >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> >> >> 9325&creativeASIN=1935182021&
>> >> >> >> >> > > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> >> >> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
>> >> >> >> >> > > > > > > > > 18%22
>> >> >> >> >> > > > > > > > > > >
>> >> >> >> >> > > > > > > > > > >
>> >> >> >> >> > > > > > > > > > > <http:////
>> >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
>> >> >> ir?t=garygregory-20&l=am2&o=1&
>> >> >> >> a=
>> >> >> >> >> > > > > > > > > > 1935182021>
>> >> >> >> >> > > > > > > > > > > Spring Batch in Action
>> >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
>> >> >> >> >> product/1935182951/ref=as_li_
>> >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> >> >> 9325&creativeASIN=1935182951&
>> >> >> >> >> > > > > > > > > >
>> >> >> >> >> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> >> >> >> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> >> >> >> > > > > > > > > > > <http:////
>> >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
>> >> >> ir?t=garygregory-20&l=am2&o=1&
>> >> >> >> a=
>> >> >> >> >> > > > > > > > > > 1935182951>
>> >> >> >> >> > > > > > > > > > > Blog: http://garygregory.wordpress.com
>> >> >> >> >> > > > > > > > > > > Home: http://garygregory.com/
>> >> >> >> >> > > > > > > > > > > Tweet! http://twitter.com/GaryGregory
>> >> >> >> >> > > > > > > > > >
>> >> >> >> >> > > > > > > > > >
>> >> >> >> >> > ------------------------------------------------------------
>> >> >> >> >> > > > > > > ---------
>> >> >> >> >> > > > > > > > > > To unsubscribe, e-mail:
>> dev-unsubscribe@commons.
>> >> >> >> >> apache.org
>> >> >> >> >> > > > > > > > > > For additional commands, e-mail:
>> >> >> >> >> > dev-help@commons.apache.org
>> >> >> >> >> > > > > > > > > >
>> >> >> >> >> > > > > > > > > >
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > > > --
>> >> >> >> >> > > > > > > > > E-Mail: garydgregory@gmail.com |
>> >> ggregory@apache.org
>> >> >> >> >> > > > > > > > > Java Persistence with Hibernate, Second Edition
>> >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
>> >> >> >> product/1617290459/ref=as_li_
>> >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> >> >> 9325&creativeASIN=1617290459&
>> >> >> >> >> > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> >> >> > > > > > cadb800f39946ec62ea2b1af9fe6a2
>> >> >> >> >> > > > > > > b8>
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
>> >> >> >> >> > > > > > > > > 1617290459>
>> >> >> >> >> > > > > > > > > JUnit in Action, Second Edition
>> >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
>> >> >> >> product/1935182021/ref=as_li_
>> >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> >> >> 9325&creativeASIN=1935182021&
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> >> >> > > > 31ecd1f6b6d1eaf8886ac902a24de4
>> >> >> >> >> > > > > > 18%22
>> >> >> >> >> > > > > > > > > >
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
>> >> >> >> >> > > > > > > > > 1935182021>
>> >> >> >> >> > > > > > > > > Spring Batch in Action
>> >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
>> >> >> >> product/1935182951/ref=as_li_
>> >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> >> >> 9325&creativeASIN=1935182951&
>> >> >> >> >> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
>> >> >> >> >> tag=garygregory-20&linkId=%7B%
>> >> >> >> >> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> >> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
>> >> >> >> >> > > > > > > > > 1935182951>
>> >> >> >> >> > > > > > > > > Blog: http://garygregory.wordpress.com
>> >> >> >> >> > > > > > > > > Home: http://garygregory.com/
>> >> >> >> >> > > > > > > > > Tweet! http://twitter.com/GaryGregory
>> >> >> >> >> > > > > > > > >
>> >> >> >> >> > > > > > > >
>> >> >> >> >> > > > > > > >
>> >> >> >> >> > > > > > > >
>> >> >> >> >> > > > > > > > --
>> >> >> >> >> > > > > > > > Matt Sicker <bo...@gmail.com>
>> >> >> >> >> > > > > > >
>> >> >> >> >> > > > > >
>> >> >> >> >> > > > > >
>> >> >> >> >> > > > > >
>> >> >> >> >> > > > > > --
>> >> >> >> >> > > > > > Matt Sicker <bo...@gmail.com>
>> >> >> >> >> > > > > >
>> >> >> >> >> > > > >
>> >> >> >> >> > > > >
>> >> >> >> >> > > > >
>> >> >> >> >> > > > > --
>> >> >> >> >> > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> >> >> >> >> > > > > Java Persistence with Hibernate, Second Edition
>> >> >> >> >> > > > > <
>> >> >> >> >> > > > > https://www.amazon.com/gp/
>> product/1617290459/ref=as_li_
>> >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
>> 9325&creativeASIN=1617290459&
>> >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2b8
>> >> >> >> >> > > > > >
>> >> >> >> >> > > > >
>> >> >> >> >> > > > > <http:////
>> >> >> >> >> > > > >
>> >> >> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> >> >> >> a=1617290459
>> >> >> >> >> > > >
>> >> >> >> >> > > > > JUnit in Action, Second Edition
>> >> >> >> >> > > > > <
>> >> >> >> >> > > > > https://www.amazon.com/gp/
>> product/1935182021/ref=as_li_
>> >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
>> 9325&creativeASIN=1935182021&
>> >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> >> >> 31ecd1f6b6d1eaf8886ac902a24de4
>> >> >> >> >> > > 18%22
>> >> >> >> >> > > > > >
>> >> >> >> >> > > > >
>> >> >> >> >> > > > > <http:////
>> >> >> >> >> > > > >
>> >> >> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> >> >> >> a=1935182021
>> >> >> >> >> > > >
>> >> >> >> >> > > > > Spring Batch in Action
>> >> >> >> >> > > > > <
>> >> >> >> >> > > > > https://www.amazon.com/gp/
>> product/1935182951/ref=as_li_
>> >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
>> 9325&creativeASIN=1935182951&
>> >> >> >> >> > > > linkCode=%7B%7BlinkCode%7D%7D&
>> >> tag=garygregory-20&linkId=%7B%
>> >> >> >> >> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
>> >> >> >> >> > > > > >
>> >> >> >> >> > > > > <http:////
>> >> >> >> >> > > > >
>> >> >> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> >> >> >> a=1935182951
>> >> >> >> >> > > >
>> >> >> >> >> > > > > Blog: http://garygregory.wordpress.com
>> >> >> >> >> > > > > Home: http://garygregory.com/
>> >> >> >> >> > > > > Tweet! http://twitter.com/GaryGregory
>> >> >> >> >> > > > >
>> >> >> >> >> > > >
>> >> >> >> >> > >
>> >> >> >> >> > >
>> >> >> >> >> > >
>> >> >> >> >> > > --
>> >> >> >> >> > > Matt Sicker <bo...@gmail.com>
>> >> >> >> >> > >
>> >> >> >> >> >
>> >> >> >> >>
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > --
>> >> >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> >> >> >> > Java Persistence with Hibernate, Second Edition
>> >> >> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> >> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> >> >> >> linkCode=as2&tag=garygregory-20&linkId=
>> >> cadb800f39946ec62ea2b1af9fe6a2
>> >> >> b8>
>> >> >> >> >
>> >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> >> garygregory-20&l=am2&o=1&a=
>> >> >> >> 1617290459>
>> >> >> >> > JUnit in Action, Second Edition
>> >> >> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> >> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> >> >> >> linkCode=as2&tag=garygregory-20&linkId=
>> >> 31ecd1f6b6d1eaf8886ac902a24de4
>> >> >> 18%22
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> >> garygregory-20&l=am2&o=1&a=
>> >> >> >> 1935182021>
>> >> >> >> > Spring Batch in Action
>> >> >> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> >> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> >> >> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> >> garygregory-20&l=am2&o=1&a=
>> >> >> >> 1935182951>
>> >> >> >> > Blog: http://garygregory.wordpress.com
>> >> >> >> > Home: http://garygregory.com/
>> >> >> >> > Tweet! http://twitter.com/GaryGregory
>> >> >> >>
>> >> >> >> ------------------------------------------------------------
>> >> ---------
>> >> >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> >> >> >> For additional commands, e-mail: dev-help@commons.apache.org
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> >> >> > Java Persistence with Hibernate, Second Edition
>> >> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> >> >> linkCode=as2&tag=garygregory-20&linkId=
>> cadb800f39946ec62ea2b1af9fe6a2
>> >> b8>
>> >> >> >
>> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> garygregory-20&l=am2&o=1&a=
>> >> >> 1617290459>
>> >> >> > JUnit in Action, Second Edition
>> >> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> >> >> linkCode=as2&tag=garygregory-20&linkId=
>> 31ecd1f6b6d1eaf8886ac902a24de4
>> >> 18%22
>> >> >> >
>> >> >> >
>> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> garygregory-20&l=am2&o=1&a=
>> >> >> 1935182021>
>> >> >> > Spring Batch in Action
>> >> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> >> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> garygregory-20&l=am2&o=1&a=
>> >> >> 1935182951>
>> >> >> > Blog: http://garygregory.wordpress.com
>> >> >> > Home: http://garygregory.com/
>> >> >> > Tweet! http://twitter.com/GaryGregory
>> >> >>
>> >> >> ------------------------------------------------------------
>> ---------
>> >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> >> >> For additional commands, e-mail: dev-help@commons.apache.org
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> > --
>> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> >> > Java Persistence with Hibernate, Second Edition
>> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> >> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
>> b8>
>> >> >
>> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> garygregory-20&l=am2&o=1&a=
>> >> 1617290459>
>> >> > JUnit in Action, Second Edition
>> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> >> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
>> 18%22
>> >> >
>> >> >
>> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> garygregory-20&l=am2&o=1&a=
>> >> 1935182021>
>> >> > Spring Batch in Action
>> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> garygregory-20&l=am2&o=1&a=
>> >> 1935182951>
>> >> > Blog: http://garygregory.wordpress.com
>> >> > Home: http://garygregory.com/
>> >> > Tweet! http://twitter.com/GaryGregory
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> >> For additional commands, e-mail: dev-help@commons.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > Java Persistence with Hibernate, Second Edition
>> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>> >
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1617290459>
>> > JUnit in Action, Second Edition
>> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
>> >
>> >
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1935182021>
>> > Spring Batch in Action
>> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1935182951>
>> > Blog: http://garygregory.wordpress.com
>> > Home: http://garygregory.com/
>> > Tweet! http://twitter.com/GaryGregory
>>
>> ---------------------------------------------------------------------
>> 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


Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
On Mon, Nov 28, 2016 at 7:15 AM, Jochen Wiedmann <jo...@gmail.com>
wrote:

> On Mon, Nov 28, 2016 at 4:06 PM, sebb <se...@gmail.com> wrote:
>
> > The code would not run without the JCIP jar.
>
> Are there licensing issues regarding that jar?
>

Hm, according to https://www.apache.org/legal/resolved.html, the license
"Creative Commons Attribution (CC-A) 2.5" is discussed in the section "HOW
SHOULD "WEAK COPYLEFT" LICENSES BE HANDLED?"

It looks like we might have an issue but this is not clear to me as IANAL.
I you look at the license summary
https://creativecommons.org/licenses/by/2.5/ it sure seems OK, but our
resolved.html has this license on a list of licenses to watch out for.

So to be on the safe side, how do we best re-implement these? The
annotation names we can keep as is but I would imagine that we'd want to
re-write the Javadoc from scratch.

Thoughts?

Gary


> Jochen
>
>
> --
> The next time you hear: "Don't reinvent the wheel!"
>
> http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/
> evolution-of-the-wheel-300x85.jpg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] Thread safety annotations

Posted by sebb <se...@gmail.com>.
On 28 November 2016 at 15:15, Jochen Wiedmann <jo...@gmail.com> wrote:
> On Mon, Nov 28, 2016 at 4:06 PM, sebb <se...@gmail.com> wrote:
>
>> The code would not run without the JCIP jar.
>
> Are there licensing issues regarding that jar?

I think there were, but regardless, the jar serves no runtime purpose
as far as HC (or Commons) is concerned.

> Jochen
>
>
> --
> The next time you hear: "Don't reinvent the wheel!"
>
> http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg
>
> ---------------------------------------------------------------------
> 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


Re: [lang] Thread safety annotations

Posted by Jochen Wiedmann <jo...@gmail.com>.
On Mon, Nov 28, 2016 at 4:06 PM, sebb <se...@gmail.com> wrote:

> The code would not run without the JCIP jar.

Are there licensing issues regarding that jar?

Jochen


-- 
The next time you hear: "Don't reinvent the wheel!"

http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg

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


Re: [lang] Thread safety annotations

Posted by sebb <se...@gmail.com>.
On 28 November 2016 at 13:10, Jochen Wiedmann <jo...@gmail.com> wrote:
> On Mon, Nov 28, 2016 at 12:03 PM, sebb <se...@gmail.com> wrote:
>> Yes, we started with the ones from JCIP, but these had runtime
>> retention, which caused issues.
>
> What kind of problems, if I may ask?

The code would not run without the JCIP jar.

> Thanks,
>
> Jochen
>
> ---------------------------------------------------------------------
> 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


Re: [lang] Thread safety annotations

Posted by Jochen Wiedmann <jo...@gmail.com>.
On Mon, Nov 28, 2016 at 12:03 PM, sebb <se...@gmail.com> wrote:
> Yes, we started with the ones from JCIP, but these had runtime
> retention, which caused issues.

What kind of problems, if I may ask?

Thanks,

Jochen

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


Re: [lang] Thread safety annotations

Posted by sebb <se...@gmail.com>.
Yes, we started with the ones from JCIP, but these had runtime
retention, which caused issues.
I e-mailed JCIP asking if the retention could be changed, but no joy.

We therefore created our own from elsewhere.
Not sure why we eventually dropped them.

On 28 November 2016 at 04:06, Matt Sicker <bo...@gmail.com> wrote:
> Well, HttpClient used to have the same (or similar) thread safety
> annotations for documentation purposes, and I think they were just custom
> annotations and not the javax ones.
>
> On 27 November 2016 at 20:50, Gary Gregory <ga...@gmail.com> wrote:
>
>> On Nov 27, 2016 6:46 PM, "Matt Sicker" <bo...@gmail.com> wrote:
>> >
>> > I'd be in favor of just including this as an internal annotation similar
>> to
>> > how it's done in HttpClient.
>>
>> What does that mean specifically? FWIW, I think those annotations might be
>> gone in the current svn trunk.
>>
>> Gary
>> >
>> > On 27 November 2016 at 20:44, Gary Gregory <ga...@gmail.com>
>> wrote:
>> >
>> > > I do not think we should use an official Java package because the JSR
>> 305
>> > > page says "The Executive Committee voted to list this JSR as dormant in
>> May
>> > > 2012."
>> > >
>> > > Gary
>> > >
>> > > On Nov 27, 2016 6:39 PM, "Matt Sicker" <bo...@gmail.com> wrote:
>> > >
>> > > > If you're going to share the annotations between projects, why not
>> use a
>> > > > JSR package for it like the google one? I thought the idea of
>> embedding
>> > > the
>> > > > annotations in [lang] was to prevent the need for the dependency and
>> to
>> > > use
>> > > > it internally, not as a public annotation for other projects to use.
>> > > >
>> > > > On 27 November 2016 at 19:55, Gary Gregory <ga...@gmail.com>
>> > > wrote:
>> > > >
>> > > > > Are you suggesting [lang] becomes a multi-module project?
>> > > > >
>> > > > > Gary
>> > > > >
>> > > > > On Nov 27, 2016 5:01 PM, "sebb" <se...@gmail.com> wrote:
>> > > > >
>> > > > > > On 28 November 2016 at 00:11, Gary Gregory <
>> garydgregory@gmail.com
>> >
>> > > > > wrote:
>> > > > > > > On Sun, Nov 27, 2016 at 4:09 PM, sebb <se...@gmail.com>
>> wrote:
>> > > > > > >
>> > > > > > >> On 27 November 2016 at 23:51, Gary Gregory <
>> > > garydgregory@gmail.com>
>> > > > > > wrote:
>> > > > > > >> > On Sun, Nov 27, 2016 at 3:41 PM, sebb <se...@gmail.com>
>> wrote:
>> > > > > > >> >
>> > > > > > >> >> On 27 November 2016 at 22:31, Gary Gregory <
>> > > > garydgregory@gmail.com
>> > > > > >
>> > > > > > >> wrote:
>> > > > > > >> >> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <se...@gmail.com>
>> > > > wrote:
>> > > > > > >> >> >
>> > > > > > >> >> >> On 27 November 2016 at 22:03, Gary Gregory <
>> > > > > > garydgregory@gmail.com>
>> > > > > > >> >> wrote:
>> > > > > > >> >> >> > These annotations are the SAME as have been published
>> all
>> > > > over
>> > > > > > the
>> > > > > > >> >> place,
>> > > > > > >> >> >> > so I do not think we need a PR for review. Reviewing
>> the
>> > > > code
>> > > > > in
>> > > > > > >> the
>> > > > > > >> >> repo
>> > > > > > >> >> >> > should be enough, but I'm not sure _what_ there is to
>> > > review
>> > > > > > >> really.
>> > > > > > >> >> I've
>> > > > > > >> >> >> > already posted a link to the sources (a pastebin
>> link).
>> > > I'll
>> > > > > > >> create a
>> > > > > > >> >> >> Jira
>> > > > > > >> >> >> > of course.
>> > > > > > >> >> >>
>> > > > > > >> >> >> There is one aspect that needs review: does the
>> annotation
>> > > > > belong
>> > > > > > in
>> > > > > > >> >> LANG?
>> > > > > > >> >> >> If we want to use the annotation in other components, do
>> > > they
>> > > > > > have to
>> > > > > > >> >> >> depend on LANG?
>> > > > > > >> >> >>
>> > > > > > >> >> >
>> > > > > > >> >> > No see below and previous messages.
>> > > > > > >> >> >
>> > > > > > >> >> >
>> > > > > > >> >> >> If not, do they all have their own copies?
>> > > > > > >> >> >>
>> > > > > > >> >> >
>> > > > > > >> >> > No.
>> > > > > > >> >> >
>> > > > > > >> >> >
>> > > > > > >> >> >>
>> > > > > > >> >> >> And what happens when LANG needs a non-BC release?
>> > > > > > >> >> >>
>> > > > > > >> >> >
>> > > > > > >> >> > What is the issue I am missing?
>> > > > > > >> >> >
>> > > > > > >> >>
>> > > > > > >> >> The package name for the annotation might need to change
>> > > > > > >> >> That would be a downstream nuisance.
>> > > > > > >> >>
>> > > > > > >> >
>> > > > > > >> > Hi All,
>> > > > > > >> >
>> > > > > > >> > How is that different than changing the package name for any
>> of
>> > > > our
>> > > > > > other
>> > > > > > >> > lang types?
>> > > > > > >>
>> > > > > > >> It's not.
>> > > > > > >>
>> > > > > > >> > If you want move a package, you have to break BC and we have
>> > > clear
>> > > > > > >> > guidelines for that task.
>> > > > > > >>
>> > > > > > >> But why should I have to change package imports for
>> annotations
>> > > just
>> > > > > > >> because they happen to be in LANG?
>> > > > > > >>
>> > > > > > >> Note that this could get confusing.
>> > > > > > >>
>> > > > > > >> Say XYZ component starts out only needing lang for the
>> > > annotations.
>> > > > > > >> So they include LANG 3.x and code the annotations.
>> > > > > > >>
>> > > > > > >> Later they find they want LANG 4.x for runtime.
>> > > > > > >> They would then need to drop the LANG 3.x dependency, fix up
>> all
>> > > the
>> > > > > > >> annotation imports etc.
>> > > > > > >> Unnecessary work if the annotations were in a separate
>> component.
>> > > > > > >>
>> > > > > > >> Also, any tool that wants to check the annotations will have
>> to
>> > > look
>> > > > > > >> for them in lots of packages.
>> > > > > > >>
>> > > > > > >> Whilst it can no doubt be made to work, it's going to cause
>> > > problems
>> > > > > > later.
>> > > > > > >>
>> > > > > > >
>> > > > > > > To be on the playful side, this is what my mother calls
>> "borrowing
>> > > > > > trouble"
>> > > > > > > ;-)
>> > > > > > >
>> > > > > > > We can future-trip ourselves in all sorts of troubles. Our
>> > > > imaginations
>> > > > > > > know no bounds!  :-)
>> > > > > >
>> > > > > > This is not an imaginary scenario.
>> > > > > >
>> > > > > > We know that LANG will have a non-BC release at some point.
>> > > > > > The plan is to allow non-LANG components to share the LANG
>> > > annotations.
>> > > > > > We know that components which originally don't need LANG may end
>> up
>> > > > > > needing LANG at run-time.
>> > > > > > Therefore the problem will occur.
>> > > > > >
>> > > > > > In this case, "look before you leap" is appropriate.
>> > > > > >
>> > > > > > > Gary
>> > > > > > >
>> > > > > > >
>> > > > > > >>
>> > > > > > >> > Since already have a package called
>> org.apache.commons.lang3.
>> > > > > > concurrent,
>> > > > > > >> I
>> > > > > > >> > propose we place these annottaions in
>> > > > > > >> > org.apache.commons.lang3.concurrent.annotation.
>> > > > > > >> >
>> > > > > > >> >
>> > > > > > >> >> >>
>> > > > > > >> >> >> My expectation for such annotations is that they would
>> be
>> > > > > > >> >> >> self-contained (or built-in to the languange, not LANG).
>> > > > > > >> >> >>
>> > > > > > >> >> >
>> > > > > > >> >> > It is _because_ they are NOT built-in the language or JRE
>> > > that
>> > > > we
>> > > > > > are
>> > > > > > >> >> > proposing they belong in [lang].
>> > > > > > >> >> >
>> > > > > > >> >> > Since we are providing the annotation with CLASS
>> retention
>> > > only
>> > > > > > >> >> > (initially), there is no hard dependency on [lang] at
>> > > runtime.
>> > > > > > >> >> >
>> > > > > > >> >> > Is there some subtlety we are missing?
>> > > > > > >> >>
>> > > > > > >> >> Yes, the compile-time dependency.
>> > > > > > >> >>
>> > > > > > >> >
>> > > > > > >> > No surprise, right? You can't use an annotation without
>> > > compiling
>> > > > > the
>> > > > > > >> > source file.
>> > > > > > >> >
>> > > > > > >> >
>> > > > > > >> >> AFAIK it's not possible to have a Maven compile-only
>> > > dependency;
>> > > > > > >> >> compile-time implies run-time.
>> > > > > > >> >>
>> > > > > > >> >
>> > > > > > >> > That's a tooling issue of course which should not invalidate
>> the
>> > > > > > >> worthiness
>> > > > > > >> > of this feature.
>> > > > > > >> >
>> > > > > > >> > If I am a downstream user of Commons Lang's new annotations,
>> I
>> > > > would
>> > > > > > >> need a
>> > > > > > >> > Maven scope that says "I need [lang] as a compile time only
>> > > > > > dependency" I
>> > > > > > >> > do not see such a scope on
>> > > > > > >> > https://maven.apache.org/guides/introduction/
>> > > > > > introduction-to-dependency-
>> > > > > > >> mechanism.html#Dependency_Scope
>> > > > > > >> >
>> > > > > > >> > Time for a Jira!
>> > > > > > >> >
>> > > > > > >> > I wonder what Gradle offers users in this dept.?
>> > > > > > >> >
>> > > > > > >> > Gary
>> > > > > > >> >
>> > > > > > >> >
>> > > > > > >> >>
>> > > > > > >> >> > Gary
>> > > > > > >> >> >
>> > > > > > >> >> >
>> > > > > > >> >> >> > Gary
>> > > > > > >> >> >> >
>> > > > > > >> >> >> > On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <
>> > > > > > >> britter@apache.org>
>> > > > > > >> >> >> wrote:
>> > > > > > >> >> >> >
>> > > > > > >> >> >> >> Hi,
>> > > > > > >> >> >> >>
>> > > > > > >> >> >> >> Gary Gregory <ga...@gmail.com> schrieb am
>> So.,
>> > > 27.
>> > > > > Nov.
>> > > > > > >> 2016
>> > > > > > >> >> um
>> > > > > > >> >> >> >> 21:01 Uhr:
>> > > > > > >> >> >> >>
>> > > > > > >> >> >> >> > So let's start with the CLASS retention annotations
>> > > > first.
>> > > > > > I'll
>> > > > > > >> >> commit
>> > > > > > >> >> >> >> > later today.
>> > > > > > >> >> >> >> >
>> > > > > > >> >> >> >>
>> > > > > > >> >> >> >> Maybe create a GitHub PR so people can have a look
>> before
>> > > > it
>> > > > > > goes
>> > > > > > >> to
>> > > > > > >> >> >> >> master?
>> > > > > > >> >> >> >>
>> > > > > > >> >> >> >> Benedikt
>> > > > > > >> >> >> >>
>> > > > > > >> >> >> >>
>> > > > > > >> >> >> >> >
>> > > > > > >> >> >> >> > Gary
>> > > > > > >> >> >> >> >
>> > > > > > >> >> >> >> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <
>> > > boards@gmail.com
>> > > > >
>> > > > > > >> wrote:
>> > > > > > >> >> >> >> >
>> > > > > > >> >> >> >> > > I feel like documenting thread safety in such a
>> low
>> > > > > level,
>> > > > > > >> widely
>> > > > > > >> >> >> used
>> > > > > > >> >> >> >> > > library like [lang] is a great idea. Whether it
>> uses
>> > > > > > >> annotations,
>> > > > > > >> >> >> >> > javadocs,
>> > > > > > >> >> >> >> > > or some sort of informal javadoc comments isn't
>> too
>> > > > big a
>> > > > > > >> deal to
>> > > > > > >> >> >> me,
>> > > > > > >> >> >> >> but
>> > > > > > >> >> >> >> > > providing some guarantees of thread safety or
>> lack
>> > > > > thereof
>> > > > > > >> would
>> > > > > > >> >> be
>> > > > > > >> >> >> >> > > invaluable information.
>> > > > > > >> >> >> >> > >
>> > > > > > >> >> >> >> > > On 27 November 2016 at 07:11, Benedikt Ritter <
>> > > > > > >> >> britter@apache.org>
>> > > > > > >> >> >> >> > wrote:
>> > > > > > >> >> >> >> > >
>> > > > > > >> >> >> >> > > > I thought we decided to abstain from
>> documenting
>> > > > thread
>> > > > > > >> safety
>> > > > > > >> >> >> since
>> > > > > > >> >> >> >> it
>> > > > > > >> >> >> >> > > > would get outdated quickly anyway.
>> > > > > > >> >> >> >> > > >
>> > > > > > >> >> >> >> > > > Gary Gregory <ga...@gmail.com> schrieb
>> am
>> > > > So.,
>> > > > > > 27.
>> > > > > > >> Nov.
>> > > > > > >> >> >> 2016
>> > > > > > >> >> >> >> um
>> > > > > > >> >> >> >> > > > 09:11 Uhr:
>> > > > > > >> >> >> >> > > >
>> > > > > > >> >> >> >> > > > > But if we then want a runtime version we had
>> an
>> > > odd
>> > > > > > >> packaging
>> > > > > > >> >> >> with
>> > > > > > >> >> >> >> > > CLASS
>> > > > > > >> >> >> >> > > > > retention in .concurrent. and RUNTIME in
>> > > > > > >> .concurrent.runtime.
>> > > > > > >> >> >> >> > > > >
>> > > > > > >> >> >> >> > > > > I might be in YAGNI territory here...
>> > > > > > >> >> >> >> > > > >
>> > > > > > >> >> >> >> > > > > Gary
>> > > > > > >> >> >> >> > > > >
>> > > > > > >> >> >> >> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker
>> <
>> > > > > > >> >> boards@gmail.com
>> > > > > > >> >> >> >
>> > > > > > >> >> >> >> > > wrote:
>> > > > > > >> >> >> >> > > > >
>> > > > > > >> >> >> >> > > > > > I think adding the additional clazz/runtime
>> > > > package
>> > > > > > >> would
>> > > > > > >> >> be a
>> > > > > > >> >> >> >> > little
>> > > > > > >> >> >> >> > > > > > overkill if you only include one packaging
>> > > option
>> > > > > for
>> > > > > > >> now.
>> > > > > > >> >> >> >> > > > > >
>> > > > > > >> >> >> >> > > > > > On 27 November 2016 at 00:04, Gary Gregory
>> <
>> > > > > > >> >> >> >> garydgregory@gmail.com
>> > > > > > >> >> >> >> > >
>> > > > > > >> >> >> >> > > > > wrote:
>> > > > > > >> >> >> >> > > > > >
>> > > > > > >> >> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <
>> > > > > > >> boards@gmail.com
>> > > > > > >> >> >
>> > > > > > >> >> >> >> wrote:
>> > > > > > >> >> >> >> > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > I can think of a couple use cases for
>> > > runtime
>> > > > > > >> retention
>> > > > > > >> >> >> for
>> > > > > > >> >> >> >> > > thread
>> > > > > > >> >> >> >> > > > > > safety
>> > > > > > >> >> >> >> > > > > > > > annotations, but they're not specific
>> to
>> > > > > commons
>> > > > > > >> lang.
>> > > > > > >> >> >> >> > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > 1. A framework could choose what type
>> of
>> > > data
>> > > > > > >> >> structure or
>> > > > > > >> >> >> >> > > > algorithm
>> > > > > > >> >> >> >> > > > > to
>> > > > > > >> >> >> >> > > > > > > use
>> > > > > > >> >> >> >> > > > > > > > at runtime based on the presence of
>> which
>> > > > > thread
>> > > > > > >> safety
>> > > > > > >> >> >> >> > > annotation
>> > > > > > >> >> >> >> > > > is
>> > > > > > >> >> >> >> > > > > > on.
>> > > > > > >> >> >> >> > > > > > > > Same for mutability.
>> > > > > > >> >> >> >> > > > > > > > 2. A testing framework could use these
>> > > > > > annotations
>> > > > > > >> to
>> > > > > > >> >> try
>> > > > > > >> >> >> and
>> > > > > > >> >> >> >> > > > > automate
>> > > > > > >> >> >> >> > > > > > > some
>> > > > > > >> >> >> >> > > > > > > > sort of thread safety tests, though
>> that
>> > > > sounds
>> > > > > > >> like a
>> > > > > > >> >> >> hard
>> > > > > > >> >> >> >> > > problem
>> > > > > > >> >> >> >> > > > > to
>> > > > > > >> >> >> >> > > > > > > > actually implement.
>> > > > > > >> >> >> >> > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > However, it'd be easier to just start
>> with
>> > > > > class
>> > > > > > >> >> retention
>> > > > > > >> >> >> >> (or
>> > > > > > >> >> >> >> > > > source
>> > > > > > >> >> >> >> > > > > > > > retention) just for documentation
>> purposes.
>> > > > > > Higher
>> > > > > > >> >> >> retention
>> > > > > > >> >> >> >> > > levels
>> > > > > > >> >> >> >> > > > > > could
>> > > > > > >> >> >> >> > > > > > > > be added later if an important use case
>> > > came
>> > > > > up.
>> > > > > > >> >> >> >> > > > > > >
>> > > > > > >> >> >> >> > > > > > > But which packaging option?
>> > > > > > >> >> >> >> > > > > > >
>> > > > > > >> >> >> >> > > > > > > Gary
>> > > > > > >> >> >> >> > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > On 26 November 2016 at 19:56, Gary
>> Gregory
>> > > <
>> > > > > > >> >> >> >> > > garydgregory@gmail.com
>> > > > > > >> >> >> >> > > > >
>> > > > > > >> >> >> >> > > > > > > wrote:
>> > > > > > >> >> >> >> > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb
>> <
>> > > > > > >> >> sebbaz@gmail.com
>> > > > > > >> >> >> >
>> > > > > > >> >> >> >> > > wrote:
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary
>> > > > Gregory
>> > > > > <
>> > > > > > >> >> >> >> > > > > garydgregory@gmail.com
>> > > > > > >> >> >> >> > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > wrote:
>> > > > > > >> >> >> >> > > > > > > > > > > On a [crypto] thread, I mentioned
>> > > > > > >> >> >> >> > > > http://pastebin.com/RKPGGdJ9
>> > > > > > >> >> >> >> > > > > > to
>> > > > > > >> >> >> >> > > > > > > add
>> > > > > > >> >> >> >> > > > > > > > > > the
>> > > > > > >> >> >> >> > > > > > > > > > > "classic" four
>> > > > > javax.annotation.concurrent
>> > > > > > >> >> >> annotations
>> > > > > > >> >> >> >> to
>> > > > > > >> >> >> >> > > two
>> > > > > > >> >> >> >> > > > > > > packages
>> > > > > > >> >> >> >> > > > > > > > > > > (.clazz and .runtime) in Commons
>> Lang
>> > > > for
>> > > > > > >> CLASS
>> > > > > > >> >> and
>> > > > > > >> >> >> >> > RUNTIME
>> > > > > > >> >> >> >> > > > > > > retentions.
>> > > > > > >> >> >> >> > > > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > > > You'd use the CLASS version to
>> avoid
>> > > a
>> > > > > hard
>> > > > > > >> >> >> dependency
>> > > > > > >> >> >> >> on
>> > > > > > >> >> >> >> > > > > [lang].
>> > > > > > >> >> >> >> > > > > > > > > RUNTIME
>> > > > > > >> >> >> >> > > > > > > > > > > to keep them around.
>> > > > > > >> >> >> >> > > > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > > > We'd use the CLASS versions in
>> all of
>> > > > > > Commons
>> > > > > > >> for
>> > > > > > >> >> >> >> > > documenting
>> > > > > > >> >> >> >> > > > > > > thread
>> > > > > > >> >> >> >> > > > > > > > > > safety.
>> > > > > > >> >> >> >> > > > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > > > Thoughts?
>> > > > > > >> >> >> >> > > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > > Definitely Class retention, not
>> > > Runtime.
>> > > > > > >> >> >> >> > > > > > > > > > You don't want to have to include
>> the
>> > > > > > annotation
>> > > > > > >> >> jar
>> > > > > > >> >> >> on
>> > > > > > >> >> >> >> the
>> > > > > > >> >> >> >> > > > > runtime
>> > > > > > >> >> >> >> > > > > > > > > > classpath.
>> > > > > > >> >> >> >> > > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > Hi Sebb,
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > Right now I have both of these
>> packages:
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
>> > > > > > >> >> annotation.concurrent.clazz
>> > > > > > >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
>> > > > > > >> >> >> annotation.concurrent.runtime
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > Each with a copy of:
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > GuardedBy
>> > > > > > >> >> >> >> > > > > > > > > Immutable
>> > > > > > >> >> >> >> > > > > > > > > NotThreadSafe
>> > > > > > >> >> >> >> > > > > > > > > ThreadSafe
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > Should we include what I have as is?
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > If we were to only provide the
>> annotation
>> > > > at
>> > > > > > the
>> > > > > > >> >> CLASS
>> > > > > > >> >> >> >> > > retention
>> > > > > > >> >> >> >> > > > > > level,
>> > > > > > >> >> >> >> > > > > > > > > should we still package them in
>> > > > > > >> >> >> >> > ...annotation.concurrent.clazz
>> > > > > > >> >> >> >> > > in
>> > > > > > >> >> >> >> > > > > > case
>> > > > > > >> >> >> >> > > > > > > we
>> > > > > > >> >> >> >> > > > > > > > > want to provide
>> > > > annotation.concurrent.runtime
>> > > > > > >> later?
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > If we know for certain we never want
>> to
>> > > > > provide
>> > > > > > >> >> RUNTIME
>> > > > > > >> >> >> >> > > > retention,
>> > > > > > >> >> >> >> > > > > we
>> > > > > > >> >> >> >> > > > > > > can
>> > > > > > >> >> >> >> > > > > > > > > put them all in annotation.concurrent
>> > > now.
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > Thoughts?
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > Gary
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > > [I don't know why the annotations
>> were
>> > > > ever
>> > > > > > >> >> considered
>> > > > > > >> >> >> >> > > suitable
>> > > > > > >> >> >> >> > > > > for
>> > > > > > >> >> >> >> > > > > > > > > > runtime]
>> > > > > > >> >> >> >> > > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > > > Gary
>> > > > > > >> >> >> >> > > > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > > > --
>> > > > > > >> >> >> >> > > > > > > > > > > E-Mail: garydgregory@gmail.com |
>> > > > > > >> >> >> ggregory@apache.org
>> > > > > > >> >> >> >> > > > > > > > > > > Java Persistence with Hibernate,
>> > > Second
>> > > > > > >> Edition
>> > > > > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
>> > > > > > >> >> >> >> product/1617290459/ref=as_li_
>> > > > > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> > > > > > >> >> >> >> 9325&creativeASIN=1617290459&
>> > > > > > >> >> >> >> > > > > > > > > >
>> > > > > > >> >> >> >> > > > > > >
>> > > > > > >> >> >> >> > > > > linkCode=as2&tag=garygregory-20&linkId=
>> > > > > > >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2
>> > > > > > >> >> >> >> > > b8>
>> > > > > > >> >> >> >> > > > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > > > <http:////
>> > > > > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
>> > > > > > >> >> ir?t=garygregory-20&l=am2&o=1&
>> > > > > > >> >> >> a=
>> > > > > > >> >> >> >> > > > > > > > > > 1617290459>
>> > > > > > >> >> >> >> > > > > > > > > > > JUnit in Action, Second Edition
>> > > > > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
>> > > > > > >> >> >> >> product/1935182021/ref=as_li_
>> > > > > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> > > > > > >> >> >> >> 9325&creativeASIN=1935182021&
>> > > > > > >> >> >> >> > > > > > > > > > linkCode=as2&tag=garygregory-
>> > > 20&linkId=
>> > > > > > >> >> >> >> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
>> > > > > > >> >> >> >> > > > > > > > > 18%22
>> > > > > > >> >> >> >> > > > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > > > <http:////
>> > > > > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
>> > > > > > >> >> ir?t=garygregory-20&l=am2&o=1&
>> > > > > > >> >> >> a=
>> > > > > > >> >> >> >> > > > > > > > > > 1935182021>
>> > > > > > >> >> >> >> > > > > > > > > > > Spring Batch in Action
>> > > > > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
>> > > > > > >> >> >> >> product/1935182951/ref=as_li_
>> > > > > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> > > > > > >> >> >> >> 9325&creativeASIN=1935182951&
>> > > > > > >> >> >> >> > > > > > > > > >
>> > > > > > >> >> >> >> > linkCode=%7B%7BlinkCode%7D%7D&
>> > > > > tag=garygregory-20&linkId=%7B%
>> > > > > > >> >> >> >> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+
>> > > > > Batch+in+Action>
>> > > > > > >> >> >> >> > > > > > > > > > > <http:////
>> > > > > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
>> > > > > > >> >> ir?t=garygregory-20&l=am2&o=1&
>> > > > > > >> >> >> a=
>> > > > > > >> >> >> >> > > > > > > > > > 1935182951>
>> > > > > > >> >> >> >> > > > > > > > > > > Blog:
>> http://garygregory.wordpress
>> .
>> > > com
>> > > > > > >> >> >> >> > > > > > > > > > > Home: http://garygregory.com/
>> > > > > > >> >> >> >> > > > > > > > > > > Tweet!
>> > > http://twitter.com/GaryGregory
>> > > > > > >> >> >> >> > > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > >
>> > > > > > >> >> >> >> > ------------------------------
>> > > > > ------------------------------
>> > > > > > >> >> >> >> > > > > > > ---------
>> > > > > > >> >> >> >> > > > > > > > > > To unsubscribe, e-mail:
>> > > > > > dev-unsubscribe@commons.
>> > > > > > >> >> >> >> apache.org
>> > > > > > >> >> >> >> > > > > > > > > > For additional commands, e-mail:
>> > > > > > >> >> >> >> > dev-help@commons.apache.org
>> > > > > > >> >> >> >> > > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > --
>> > > > > > >> >> >> >> > > > > > > > > E-Mail: garydgregory@gmail.com |
>> > > > > > >> ggregory@apache.org
>> > > > > > >> >> >> >> > > > > > > > > Java Persistence with Hibernate,
>> Second
>> > > > > Edition
>> > > > > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
>> > > > > > >> >> >> product/1617290459/ref=as_li_
>> > > > > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> > > > > > >> >> >> >> 9325&creativeASIN=1617290459&
>> > > > > > >> >> >> >> > > > > > > > >
>> linkCode=as2&tag=garygregory-20&linkId=
>> > > > > > >> >> >> >> > > > > > cadb800f39946ec62ea2b1af9fe6a2
>> > > > > > >> >> >> >> > > > > > > b8>
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
>> > > > adsystem.com/e/ir?t=
>> > > > > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
>> > > > > > >> >> >> >> > > > > > > > > 1617290459>
>> > > > > > >> >> >> >> > > > > > > > > JUnit in Action, Second Edition
>> > > > > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
>> > > > > > >> >> >> product/1935182021/ref=as_li_
>> > > > > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> > > > > > >> >> >> >> 9325&creativeASIN=1935182021&
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> > > > > > >> >> >> >> > > > 31ecd1f6b6d1eaf8886ac902a24de4
>> > > > > > >> >> >> >> > > > > > 18%22
>> > > > > > >> >> >> >> > > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
>> > > > adsystem.com/e/ir?t=
>> > > > > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
>> > > > > > >> >> >> >> > > > > > > > > 1935182021>
>> > > > > > >> >> >> >> > > > > > > > > Spring Batch in Action
>> > > > > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
>> > > > > > >> >> >> product/1935182951/ref=as_li_
>> > > > > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> > > > > > >> >> >> >> 9325&creativeASIN=1935182951&
>> > > > > > >> >> >> >> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
>> > > > > > >> >> >> >> tag=garygregory-20&linkId=%7B%
>> > > > > > >> >> >> >> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+
>> > > > Batch+in+Action>
>> > > > > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
>> > > > adsystem.com/e/ir?t=
>> > > > > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
>> > > > > > >> >> >> >> > > > > > > > > 1935182951>
>> > > > > > >> >> >> >> > > > > > > > > Blog: http://garygregory.wordpress.
>> com
>> > > > > > >> >> >> >> > > > > > > > > Home: http://garygregory.com/
>> > > > > > >> >> >> >> > > > > > > > > Tweet!
>> http://twitter.com/GaryGregory
>> > > > > > >> >> >> >> > > > > > > > >
>> > > > > > >> >> >> >> > > > > > > >
>> > > > > > >> >> >> >> > > > > > > >
>> > > > > > >> >> >> >> > > > > > > >
>> > > > > > >> >> >> >> > > > > > > > --
>> > > > > > >> >> >> >> > > > > > > > Matt Sicker <bo...@gmail.com>
>> > > > > > >> >> >> >> > > > > > >
>> > > > > > >> >> >> >> > > > > >
>> > > > > > >> >> >> >> > > > > >
>> > > > > > >> >> >> >> > > > > >
>> > > > > > >> >> >> >> > > > > > --
>> > > > > > >> >> >> >> > > > > > Matt Sicker <bo...@gmail.com>
>> > > > > > >> >> >> >> > > > > >
>> > > > > > >> >> >> >> > > > >
>> > > > > > >> >> >> >> > > > >
>> > > > > > >> >> >> >> > > > >
>> > > > > > >> >> >> >> > > > > --
>> > > > > > >> >> >> >> > > > > E-Mail: garydgregory@gmail.com |
>> > > > ggregory@apache.org
>> > > > > > >> >> >> >> > > > > Java Persistence with Hibernate, Second
>> Edition
>> > > > > > >> >> >> >> > > > > <
>> > > > > > >> >> >> >> > > > > https://www.amazon.com/gp/
>> > > > > > product/1617290459/ref=as_li_
>> > > > > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
>> > > > > > 9325&creativeASIN=1617290459&
>> > > > > > >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
>> > > > > > >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2b8
>> > > > > > >> >> >> >> > > > > >
>> > > > > > >> >> >> >> > > > >
>> > > > > > >> >> >> >> > > > > <http:////
>> > > > > > >> >> >> >> > > > >
>> > > > > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
>> > > > ir?t=garygregory-20&l=am2&o=1&
>> > > > > > >> >> >> a=1617290459
>> > > > > > >> >> >> >> > > >
>> > > > > > >> >> >> >> > > > > JUnit in Action, Second Edition
>> > > > > > >> >> >> >> > > > > <
>> > > > > > >> >> >> >> > > > > https://www.amazon.com/gp/
>> > > > > > product/1935182021/ref=as_li_
>> > > > > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
>> > > > > > 9325&creativeASIN=1935182021&
>> > > > > > >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
>> > > > > > >> >> >> >> 31ecd1f6b6d1eaf8886ac902a24de4
>> > > > > > >> >> >> >> > > 18%22
>> > > > > > >> >> >> >> > > > > >
>> > > > > > >> >> >> >> > > > >
>> > > > > > >> >> >> >> > > > > <http:////
>> > > > > > >> >> >> >> > > > >
>> > > > > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
>> > > > ir?t=garygregory-20&l=am2&o=1&
>> > > > > > >> >> >> a=1935182021
>> > > > > > >> >> >> >> > > >
>> > > > > > >> >> >> >> > > > > Spring Batch in Action
>> > > > > > >> >> >> >> > > > > <
>> > > > > > >> >> >> >> > > > > https://www.amazon.com/gp/
>> > > > > > product/1935182951/ref=as_li_
>> > > > > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
>> > > > > > 9325&creativeASIN=1935182951&
>> > > > > > >> >> >> >> > > > linkCode=%7B%7BlinkCode%7D%7D&
>> > > > > > >> tag=garygregory-20&linkId=%7B%
>> > > > > > >> >> >> >> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
>> > > > > > >> >> >> >> > > > > >
>> > > > > > >> >> >> >> > > > > <http:////
>> > > > > > >> >> >> >> > > > >
>> > > > > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
>> > > > ir?t=garygregory-20&l=am2&o=1&
>> > > > > > >> >> >> a=1935182951
>> > > > > > >> >> >> >> > > >
>> > > > > > >> >> >> >> > > > > Blog: http://garygregory.wordpress.com
>> > > > > > >> >> >> >> > > > > Home: http://garygregory.com/
>> > > > > > >> >> >> >> > > > > Tweet! http://twitter.com/GaryGregory
>> > > > > > >> >> >> >> > > > >
>> > > > > > >> >> >> >> > > >
>> > > > > > >> >> >> >> > >
>> > > > > > >> >> >> >> > >
>> > > > > > >> >> >> >> > >
>> > > > > > >> >> >> >> > > --
>> > > > > > >> >> >> >> > > Matt Sicker <bo...@gmail.com>
>> > > > > > >> >> >> >> > >
>> > > > > > >> >> >> >> >
>> > > > > > >> >> >> >>
>> > > > > > >> >> >> >
>> > > > > > >> >> >> >
>> > > > > > >> >> >> >
>> > > > > > >> >> >> > --
>> > > > > > >> >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > > > > > >> >> >> > Java Persistence with Hibernate, Second Edition
>> > > > > > >> >> >> > <
>> https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> > > > > > >> >> >>
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> > > > > > >> >> >> linkCode=as2&tag=garygregory-20&linkId=
>> > > > > > >> cadb800f39946ec62ea2b1af9fe6a2
>> > > > > > >> >> b8>
>> > > > > > >> >> >> >
>> > > > > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> > > > > > >> >> garygregory-20&l=am2&o=1&a=
>> > > > > > >> >> >> 1617290459>
>> > > > > > >> >> >> > JUnit in Action, Second Edition
>> > > > > > >> >> >> > <
>> https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> > > > > > >> >> >>
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> > > > > > >> >> >> linkCode=as2&tag=garygregory-20&linkId=
>> > > > > > >> 31ecd1f6b6d1eaf8886ac902a24de4
>> > > > > > >> >> 18%22
>> > > > > > >> >> >> >
>> > > > > > >> >> >> >
>> > > > > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> > > > > > >> >> garygregory-20&l=am2&o=1&a=
>> > > > > > >> >> >> 1935182021>
>> > > > > > >> >> >> > Spring Batch in Action
>> > > > > > >> >> >> > <
>> https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> > > > > > >> >> >>
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> > > > > > >> >> >> linkCode=%7B%7BlinkCode%7D%7D&
>> > > tag=garygregory-20&linkId=%7B%
>> > > > > > >> >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> > > > > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> > > > > > >> >> garygregory-20&l=am2&o=1&a=
>> > > > > > >> >> >> 1935182951>
>> > > > > > >> >> >> > Blog: http://garygregory.wordpress.com
>> > > > > > >> >> >> > Home: http://garygregory.com/
>> > > > > > >> >> >> > Tweet! http://twitter.com/GaryGregory
>> > > > > > >> >> >>
>> > > > > > >> >> >> ------------------------------
>> > > ------------------------------
>> > > > > > >> ---------
>> > > > > > >> >> >> To unsubscribe, e-mail:
>> dev-unsubscribe@commons.apache.org
>> > > > > > >> >> >> For additional commands, e-mail:
>> > > dev-help@commons.apache.org
>> > > > > > >> >> >>
>> > > > > > >> >> >>
>> > > > > > >> >> >
>> > > > > > >> >> >
>> > > > > > >> >> > --
>> > > > > > >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > > > > > >> >> > Java Persistence with Hibernate, Second Edition
>> > > > > > >> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> > > > > > >> >> tl?ie=UTF8&camp=1789&creative=
>> 9325&creativeASIN=1617290459&
>> > > > > > >> >> linkCode=as2&tag=garygregory-20&linkId=
>> > > > > > cadb800f39946ec62ea2b1af9fe6a2
>> > > > > > >> b8>
>> > > > > > >> >> >
>> > > > > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> > > > > > >> garygregory-20&l=am2&o=1&a=
>> > > > > > >> >> 1617290459>
>> > > > > > >> >> > JUnit in Action, Second Edition
>> > > > > > >> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> > > > > > >> >> tl?ie=UTF8&camp=1789&creative=
>> 9325&creativeASIN=1935182021&
>> > > > > > >> >> linkCode=as2&tag=garygregory-20&linkId=
>> > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
>> > > > > > >> 18%22
>> > > > > > >> >> >
>> > > > > > >> >> >
>> > > > > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> > > > > > >> garygregory-20&l=am2&o=1&a=
>> > > > > > >> >> 1935182021>
>> > > > > > >> >> > Spring Batch in Action
>> > > > > > >> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> > > > > > >> >> tl?ie=UTF8&camp=1789&creative=
>> 9325&creativeASIN=1935182951&
>> > > > > > >> >> linkCode=%7B%7BlinkCode%7D%7D&
>> tag=garygregory-20&linkId=%7B%
>> > > > > > >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> > > > > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> > > > > > >> garygregory-20&l=am2&o=1&a=
>> > > > > > >> >> 1935182951>
>> > > > > > >> >> > Blog: http://garygregory.wordpress.com
>> > > > > > >> >> > Home: http://garygregory.com/
>> > > > > > >> >> > Tweet! http://twitter.com/GaryGregory
>> > > > > > >> >>
>> > > > > > >> >> ------------------------------
>> ------------------------------
>> > > > > > ---------
>> > > > > > >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> > > > > > >> >> For additional commands, e-mail:
>> dev-help@commons.apache.org
>> > > > > > >> >>
>> > > > > > >> >>
>> > > > > > >> >
>> > > > > > >> >
>> > > > > > >> > --
>> > > > > > >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > > > > > >> > Java Persistence with Hibernate, Second Edition
>> > > > > > >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> > > > > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> > > > > > >> linkCode=as2&tag=garygregory-20&linkId=
>> > > > cadb800f39946ec62ea2b1af9fe6a2
>> > > > > > b8>
>> > > > > > >> >
>> > > > > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> > > > > > garygregory-20&l=am2&o=1&a=
>> > > > > > >> 1617290459>
>> > > > > > >> > JUnit in Action, Second Edition
>> > > > > > >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> > > > > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> > > > > > >> linkCode=as2&tag=garygregory-20&linkId=
>> > > > 31ecd1f6b6d1eaf8886ac902a24de4
>> > > > > > 18%22
>> > > > > > >> >
>> > > > > > >> >
>> > > > > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> > > > > > garygregory-20&l=am2&o=1&a=
>> > > > > > >> 1935182021>
>> > > > > > >> > Spring Batch in Action
>> > > > > > >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> > > > > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> > > > > > >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> > > > > > >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> > > > > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> > > > > > garygregory-20&l=am2&o=1&a=
>> > > > > > >> 1935182951>
>> > > > > > >> > Blog: http://garygregory.wordpress.com
>> > > > > > >> > Home: http://garygregory.com/
>> > > > > > >> > Tweet! http://twitter.com/GaryGregory
>> > > > > > >>
>> > > > > > >> ------------------------------------------------------------
>> > > > ---------
>> > > > > > >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> > > > > > >> For additional commands, e-mail: dev-help@commons.apache.org
>> > > > > > >>
>> > > > > > >>
>> > > > > > >
>> > > > > > >
>> > > > > > > --
>> > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > > > > > > Java Persistence with Hibernate, Second Edition
>> > > > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> > > cadb800f39946ec62ea2b1af9fe6a2
>> > > > b8>
>> > > > > > >
>> > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> > > > garygregory-20&l=am2&o=1&a=
>> > > > > > 1617290459>
>> > > > > > > JUnit in Action, Second Edition
>> > > > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> > > 31ecd1f6b6d1eaf8886ac902a24de4
>> > > > > 18%22
>> > > > > > >
>> > > > > > >
>> > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> > > > garygregory-20&l=am2&o=1&a=
>> > > > > > 1935182021>
>> > > > > > > Spring Batch in Action
>> > > > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> > > > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> > > > garygregory-20&l=am2&o=1&a=
>> > > > > > 1935182951>
>> > > > > > > Blog: http://garygregory.wordpress.com
>> > > > > > > Home: http://garygregory.com/
>> > > > > > > Tweet! http://twitter.com/GaryGregory
>> > > > > >
>> > > > > > ------------------------------------------------------------
>> > > ---------
>> > > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> > > > > > For additional commands, e-mail: dev-help@commons.apache.org
>> > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > Matt Sicker <bo...@gmail.com>
>> > > >
>> > >
>> >
>> >
>> >
>> > --
>> > Matt Sicker <bo...@gmail.com>
>>
>
>
>
> --
> Matt Sicker <bo...@gmail.com>


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


Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
Ah, ok, what I have in there now is in our own package.

Gary

On Nov 27, 2016 8:06 PM, "Matt Sicker" <bo...@gmail.com> wrote:

> Well, HttpClient used to have the same (or similar) thread safety
> annotations for documentation purposes, and I think they were just custom
> annotations and not the javax ones.
>
> On 27 November 2016 at 20:50, Gary Gregory <ga...@gmail.com> wrote:
>
> > On Nov 27, 2016 6:46 PM, "Matt Sicker" <bo...@gmail.com> wrote:
> > >
> > > I'd be in favor of just including this as an internal annotation
> similar
> > to
> > > how it's done in HttpClient.
> >
> > What does that mean specifically? FWIW, I think those annotations might
> be
> > gone in the current svn trunk.
> >
> > Gary
> > >
> > > On 27 November 2016 at 20:44, Gary Gregory <ga...@gmail.com>
> > wrote:
> > >
> > > > I do not think we should use an official Java package because the JSR
> > 305
> > > > page says "The Executive Committee voted to list this JSR as dormant
> in
> > May
> > > > 2012."
> > > >
> > > > Gary
> > > >
> > > > On Nov 27, 2016 6:39 PM, "Matt Sicker" <bo...@gmail.com> wrote:
> > > >
> > > > > If you're going to share the annotations between projects, why not
> > use a
> > > > > JSR package for it like the google one? I thought the idea of
> > embedding
> > > > the
> > > > > annotations in [lang] was to prevent the need for the dependency
> and
> > to
> > > > use
> > > > > it internally, not as a public annotation for other projects to
> use.
> > > > >
> > > > > On 27 November 2016 at 19:55, Gary Gregory <garydgregory@gmail.com
> >
> > > > wrote:
> > > > >
> > > > > > Are you suggesting [lang] becomes a multi-module project?
> > > > > >
> > > > > > Gary
> > > > > >
> > > > > > On Nov 27, 2016 5:01 PM, "sebb" <se...@gmail.com> wrote:
> > > > > >
> > > > > > > On 28 November 2016 at 00:11, Gary Gregory <
> > garydgregory@gmail.com
> > >
> > > > > > wrote:
> > > > > > > > On Sun, Nov 27, 2016 at 4:09 PM, sebb <se...@gmail.com>
> > wrote:
> > > > > > > >
> > > > > > > >> On 27 November 2016 at 23:51, Gary Gregory <
> > > > garydgregory@gmail.com>
> > > > > > > wrote:
> > > > > > > >> > On Sun, Nov 27, 2016 at 3:41 PM, sebb <se...@gmail.com>
> > wrote:
> > > > > > > >> >
> > > > > > > >> >> On 27 November 2016 at 22:31, Gary Gregory <
> > > > > garydgregory@gmail.com
> > > > > > >
> > > > > > > >> wrote:
> > > > > > > >> >> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <
> sebbaz@gmail.com>
> > > > > wrote:
> > > > > > > >> >> >
> > > > > > > >> >> >> On 27 November 2016 at 22:03, Gary Gregory <
> > > > > > > garydgregory@gmail.com>
> > > > > > > >> >> wrote:
> > > > > > > >> >> >> > These annotations are the SAME as have been
> published
> > all
> > > > > over
> > > > > > > the
> > > > > > > >> >> place,
> > > > > > > >> >> >> > so I do not think we need a PR for review. Reviewing
> > the
> > > > > code
> > > > > > in
> > > > > > > >> the
> > > > > > > >> >> repo
> > > > > > > >> >> >> > should be enough, but I'm not sure _what_ there is
> to
> > > > review
> > > > > > > >> really.
> > > > > > > >> >> I've
> > > > > > > >> >> >> > already posted a link to the sources (a pastebin
> > link).
> > > > I'll
> > > > > > > >> create a
> > > > > > > >> >> >> Jira
> > > > > > > >> >> >> > of course.
> > > > > > > >> >> >>
> > > > > > > >> >> >> There is one aspect that needs review: does the
> > annotation
> > > > > > belong
> > > > > > > in
> > > > > > > >> >> LANG?
> > > > > > > >> >> >> If we want to use the annotation in other components,
> do
> > > > they
> > > > > > > have to
> > > > > > > >> >> >> depend on LANG?
> > > > > > > >> >> >>
> > > > > > > >> >> >
> > > > > > > >> >> > No see below and previous messages.
> > > > > > > >> >> >
> > > > > > > >> >> >
> > > > > > > >> >> >> If not, do they all have their own copies?
> > > > > > > >> >> >>
> > > > > > > >> >> >
> > > > > > > >> >> > No.
> > > > > > > >> >> >
> > > > > > > >> >> >
> > > > > > > >> >> >>
> > > > > > > >> >> >> And what happens when LANG needs a non-BC release?
> > > > > > > >> >> >>
> > > > > > > >> >> >
> > > > > > > >> >> > What is the issue I am missing?
> > > > > > > >> >> >
> > > > > > > >> >>
> > > > > > > >> >> The package name for the annotation might need to change
> > > > > > > >> >> That would be a downstream nuisance.
> > > > > > > >> >>
> > > > > > > >> >
> > > > > > > >> > Hi All,
> > > > > > > >> >
> > > > > > > >> > How is that different than changing the package name for
> any
> > of
> > > > > our
> > > > > > > other
> > > > > > > >> > lang types?
> > > > > > > >>
> > > > > > > >> It's not.
> > > > > > > >>
> > > > > > > >> > If you want move a package, you have to break BC and we
> have
> > > > clear
> > > > > > > >> > guidelines for that task.
> > > > > > > >>
> > > > > > > >> But why should I have to change package imports for
> > annotations
> > > > just
> > > > > > > >> because they happen to be in LANG?
> > > > > > > >>
> > > > > > > >> Note that this could get confusing.
> > > > > > > >>
> > > > > > > >> Say XYZ component starts out only needing lang for the
> > > > annotations.
> > > > > > > >> So they include LANG 3.x and code the annotations.
> > > > > > > >>
> > > > > > > >> Later they find they want LANG 4.x for runtime.
> > > > > > > >> They would then need to drop the LANG 3.x dependency, fix up
> > all
> > > > the
> > > > > > > >> annotation imports etc.
> > > > > > > >> Unnecessary work if the annotations were in a separate
> > component.
> > > > > > > >>
> > > > > > > >> Also, any tool that wants to check the annotations will have
> > to
> > > > look
> > > > > > > >> for them in lots of packages.
> > > > > > > >>
> > > > > > > >> Whilst it can no doubt be made to work, it's going to cause
> > > > problems
> > > > > > > later.
> > > > > > > >>
> > > > > > > >
> > > > > > > > To be on the playful side, this is what my mother calls
> > "borrowing
> > > > > > > trouble"
> > > > > > > > ;-)
> > > > > > > >
> > > > > > > > We can future-trip ourselves in all sorts of troubles. Our
> > > > > imaginations
> > > > > > > > know no bounds!  :-)
> > > > > > >
> > > > > > > This is not an imaginary scenario.
> > > > > > >
> > > > > > > We know that LANG will have a non-BC release at some point.
> > > > > > > The plan is to allow non-LANG components to share the LANG
> > > > annotations.
> > > > > > > We know that components which originally don't need LANG may
> end
> > up
> > > > > > > needing LANG at run-time.
> > > > > > > Therefore the problem will occur.
> > > > > > >
> > > > > > > In this case, "look before you leap" is appropriate.
> > > > > > >
> > > > > > > > Gary
> > > > > > > >
> > > > > > > >
> > > > > > > >>
> > > > > > > >> > Since already have a package called
> > org.apache.commons.lang3.
> > > > > > > concurrent,
> > > > > > > >> I
> > > > > > > >> > propose we place these annottaions in
> > > > > > > >> > org.apache.commons.lang3.concurrent.annotation.
> > > > > > > >> >
> > > > > > > >> >
> > > > > > > >> >> >>
> > > > > > > >> >> >> My expectation for such annotations is that they would
> > be
> > > > > > > >> >> >> self-contained (or built-in to the languange, not
> LANG).
> > > > > > > >> >> >>
> > > > > > > >> >> >
> > > > > > > >> >> > It is _because_ they are NOT built-in the language or
> JRE
> > > > that
> > > > > we
> > > > > > > are
> > > > > > > >> >> > proposing they belong in [lang].
> > > > > > > >> >> >
> > > > > > > >> >> > Since we are providing the annotation with CLASS
> > retention
> > > > only
> > > > > > > >> >> > (initially), there is no hard dependency on [lang] at
> > > > runtime.
> > > > > > > >> >> >
> > > > > > > >> >> > Is there some subtlety we are missing?
> > > > > > > >> >>
> > > > > > > >> >> Yes, the compile-time dependency.
> > > > > > > >> >>
> > > > > > > >> >
> > > > > > > >> > No surprise, right? You can't use an annotation without
> > > > compiling
> > > > > > the
> > > > > > > >> > source file.
> > > > > > > >> >
> > > > > > > >> >
> > > > > > > >> >> AFAIK it's not possible to have a Maven compile-only
> > > > dependency;
> > > > > > > >> >> compile-time implies run-time.
> > > > > > > >> >>
> > > > > > > >> >
> > > > > > > >> > That's a tooling issue of course which should not
> invalidate
> > the
> > > > > > > >> worthiness
> > > > > > > >> > of this feature.
> > > > > > > >> >
> > > > > > > >> > If I am a downstream user of Commons Lang's new
> annotations,
> > I
> > > > > would
> > > > > > > >> need a
> > > > > > > >> > Maven scope that says "I need [lang] as a compile time
> only
> > > > > > > dependency" I
> > > > > > > >> > do not see such a scope on
> > > > > > > >> > https://maven.apache.org/guides/introduction/
> > > > > > > introduction-to-dependency-
> > > > > > > >> mechanism.html#Dependency_Scope
> > > > > > > >> >
> > > > > > > >> > Time for a Jira!
> > > > > > > >> >
> > > > > > > >> > I wonder what Gradle offers users in this dept.?
> > > > > > > >> >
> > > > > > > >> > Gary
> > > > > > > >> >
> > > > > > > >> >
> > > > > > > >> >>
> > > > > > > >> >> > Gary
> > > > > > > >> >> >
> > > > > > > >> >> >
> > > > > > > >> >> >> > Gary
> > > > > > > >> >> >> >
> > > > > > > >> >> >> > On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <
> > > > > > > >> britter@apache.org>
> > > > > > > >> >> >> wrote:
> > > > > > > >> >> >> >
> > > > > > > >> >> >> >> Hi,
> > > > > > > >> >> >> >>
> > > > > > > >> >> >> >> Gary Gregory <ga...@gmail.com> schrieb am
> > So.,
> > > > 27.
> > > > > > Nov.
> > > > > > > >> 2016
> > > > > > > >> >> um
> > > > > > > >> >> >> >> 21:01 Uhr:
> > > > > > > >> >> >> >>
> > > > > > > >> >> >> >> > So let's start with the CLASS retention
> annotations
> > > > > first.
> > > > > > > I'll
> > > > > > > >> >> commit
> > > > > > > >> >> >> >> > later today.
> > > > > > > >> >> >> >> >
> > > > > > > >> >> >> >>
> > > > > > > >> >> >> >> Maybe create a GitHub PR so people can have a look
> > before
> > > > > it
> > > > > > > goes
> > > > > > > >> to
> > > > > > > >> >> >> >> master?
> > > > > > > >> >> >> >>
> > > > > > > >> >> >> >> Benedikt
> > > > > > > >> >> >> >>
> > > > > > > >> >> >> >>
> > > > > > > >> >> >> >> >
> > > > > > > >> >> >> >> > Gary
> > > > > > > >> >> >> >> >
> > > > > > > >> >> >> >> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <
> > > > boards@gmail.com
> > > > > >
> > > > > > > >> wrote:
> > > > > > > >> >> >> >> >
> > > > > > > >> >> >> >> > > I feel like documenting thread safety in such a
> > low
> > > > > > level,
> > > > > > > >> widely
> > > > > > > >> >> >> used
> > > > > > > >> >> >> >> > > library like [lang] is a great idea. Whether it
> > uses
> > > > > > > >> annotations,
> > > > > > > >> >> >> >> > javadocs,
> > > > > > > >> >> >> >> > > or some sort of informal javadoc comments isn't
> > too
> > > > > big a
> > > > > > > >> deal to
> > > > > > > >> >> >> me,
> > > > > > > >> >> >> >> but
> > > > > > > >> >> >> >> > > providing some guarantees of thread safety or
> > lack
> > > > > > thereof
> > > > > > > >> would
> > > > > > > >> >> be
> > > > > > > >> >> >> >> > > invaluable information.
> > > > > > > >> >> >> >> > >
> > > > > > > >> >> >> >> > > On 27 November 2016 at 07:11, Benedikt Ritter <
> > > > > > > >> >> britter@apache.org>
> > > > > > > >> >> >> >> > wrote:
> > > > > > > >> >> >> >> > >
> > > > > > > >> >> >> >> > > > I thought we decided to abstain from
> > documenting
> > > > > thread
> > > > > > > >> safety
> > > > > > > >> >> >> since
> > > > > > > >> >> >> >> it
> > > > > > > >> >> >> >> > > > would get outdated quickly anyway.
> > > > > > > >> >> >> >> > > >
> > > > > > > >> >> >> >> > > > Gary Gregory <ga...@gmail.com>
> schrieb
> > am
> > > > > So.,
> > > > > > > 27.
> > > > > > > >> Nov.
> > > > > > > >> >> >> 2016
> > > > > > > >> >> >> >> um
> > > > > > > >> >> >> >> > > > 09:11 Uhr:
> > > > > > > >> >> >> >> > > >
> > > > > > > >> >> >> >> > > > > But if we then want a runtime version we
> had
> > an
> > > > odd
> > > > > > > >> packaging
> > > > > > > >> >> >> with
> > > > > > > >> >> >> >> > > CLASS
> > > > > > > >> >> >> >> > > > > retention in .concurrent. and RUNTIME in
> > > > > > > >> .concurrent.runtime.
> > > > > > > >> >> >> >> > > > >
> > > > > > > >> >> >> >> > > > > I might be in YAGNI territory here...
> > > > > > > >> >> >> >> > > > >
> > > > > > > >> >> >> >> > > > > Gary
> > > > > > > >> >> >> >> > > > >
> > > > > > > >> >> >> >> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt
> Sicker
> > <
> > > > > > > >> >> boards@gmail.com
> > > > > > > >> >> >> >
> > > > > > > >> >> >> >> > > wrote:
> > > > > > > >> >> >> >> > > > >
> > > > > > > >> >> >> >> > > > > > I think adding the additional
> clazz/runtime
> > > > > package
> > > > > > > >> would
> > > > > > > >> >> be a
> > > > > > > >> >> >> >> > little
> > > > > > > >> >> >> >> > > > > > overkill if you only include one
> packaging
> > > > option
> > > > > > for
> > > > > > > >> now.
> > > > > > > >> >> >> >> > > > > >
> > > > > > > >> >> >> >> > > > > > On 27 November 2016 at 00:04, Gary
> Gregory
> > <
> > > > > > > >> >> >> >> garydgregory@gmail.com
> > > > > > > >> >> >> >> > >
> > > > > > > >> >> >> >> > > > > wrote:
> > > > > > > >> >> >> >> > > > > >
> > > > > > > >> >> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker"
> <
> > > > > > > >> boards@gmail.com
> > > > > > > >> >> >
> > > > > > > >> >> >> >> wrote:
> > > > > > > >> >> >> >> > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > I can think of a couple use cases for
> > > > runtime
> > > > > > > >> retention
> > > > > > > >> >> >> for
> > > > > > > >> >> >> >> > > thread
> > > > > > > >> >> >> >> > > > > > safety
> > > > > > > >> >> >> >> > > > > > > > annotations, but they're not specific
> > to
> > > > > > commons
> > > > > > > >> lang.
> > > > > > > >> >> >> >> > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > 1. A framework could choose what type
> > of
> > > > data
> > > > > > > >> >> structure or
> > > > > > > >> >> >> >> > > > algorithm
> > > > > > > >> >> >> >> > > > > to
> > > > > > > >> >> >> >> > > > > > > use
> > > > > > > >> >> >> >> > > > > > > > at runtime based on the presence of
> > which
> > > > > > thread
> > > > > > > >> safety
> > > > > > > >> >> >> >> > > annotation
> > > > > > > >> >> >> >> > > > is
> > > > > > > >> >> >> >> > > > > > on.
> > > > > > > >> >> >> >> > > > > > > > Same for mutability.
> > > > > > > >> >> >> >> > > > > > > > 2. A testing framework could use
> these
> > > > > > > annotations
> > > > > > > >> to
> > > > > > > >> >> try
> > > > > > > >> >> >> and
> > > > > > > >> >> >> >> > > > > automate
> > > > > > > >> >> >> >> > > > > > > some
> > > > > > > >> >> >> >> > > > > > > > sort of thread safety tests, though
> > that
> > > > > sounds
> > > > > > > >> like a
> > > > > > > >> >> >> hard
> > > > > > > >> >> >> >> > > problem
> > > > > > > >> >> >> >> > > > > to
> > > > > > > >> >> >> >> > > > > > > > actually implement.
> > > > > > > >> >> >> >> > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > However, it'd be easier to just start
> > with
> > > > > > class
> > > > > > > >> >> retention
> > > > > > > >> >> >> >> (or
> > > > > > > >> >> >> >> > > > source
> > > > > > > >> >> >> >> > > > > > > > retention) just for documentation
> > purposes.
> > > > > > > Higher
> > > > > > > >> >> >> retention
> > > > > > > >> >> >> >> > > levels
> > > > > > > >> >> >> >> > > > > > could
> > > > > > > >> >> >> >> > > > > > > > be added later if an important use
> case
> > > > came
> > > > > > up.
> > > > > > > >> >> >> >> > > > > > >
> > > > > > > >> >> >> >> > > > > > > But which packaging option?
> > > > > > > >> >> >> >> > > > > > >
> > > > > > > >> >> >> >> > > > > > > Gary
> > > > > > > >> >> >> >> > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > On 26 November 2016 at 19:56, Gary
> > Gregory
> > > > <
> > > > > > > >> >> >> >> > > garydgregory@gmail.com
> > > > > > > >> >> >> >> > > > >
> > > > > > > >> >> >> >> > > > > > > wrote:
> > > > > > > >> >> >> >> > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM,
> sebb
> > <
> > > > > > > >> >> sebbaz@gmail.com
> > > > > > > >> >> >> >
> > > > > > > >> >> >> >> > > wrote:
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > > On 26 November 2016 at 19:25,
> Gary
> > > > > Gregory
> > > > > > <
> > > > > > > >> >> >> >> > > > > garydgregory@gmail.com
> > > > > > > >> >> >> >> > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > wrote:
> > > > > > > >> >> >> >> > > > > > > > > > > On a [crypto] thread, I
> mentioned
> > > > > > > >> >> >> >> > > > http://pastebin.com/RKPGGdJ9
> > > > > > > >> >> >> >> > > > > > to
> > > > > > > >> >> >> >> > > > > > > add
> > > > > > > >> >> >> >> > > > > > > > > > the
> > > > > > > >> >> >> >> > > > > > > > > > > "classic" four
> > > > > > javax.annotation.concurrent
> > > > > > > >> >> >> annotations
> > > > > > > >> >> >> >> to
> > > > > > > >> >> >> >> > > two
> > > > > > > >> >> >> >> > > > > > > packages
> > > > > > > >> >> >> >> > > > > > > > > > > (.clazz and .runtime) in
> Commons
> > Lang
> > > > > for
> > > > > > > >> CLASS
> > > > > > > >> >> and
> > > > > > > >> >> >> >> > RUNTIME
> > > > > > > >> >> >> >> > > > > > > retentions.
> > > > > > > >> >> >> >> > > > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > > > You'd use the CLASS version to
> > avoid
> > > > a
> > > > > > hard
> > > > > > > >> >> >> dependency
> > > > > > > >> >> >> >> on
> > > > > > > >> >> >> >> > > > > [lang].
> > > > > > > >> >> >> >> > > > > > > > > RUNTIME
> > > > > > > >> >> >> >> > > > > > > > > > > to keep them around.
> > > > > > > >> >> >> >> > > > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > > > We'd use the CLASS versions in
> > all of
> > > > > > > Commons
> > > > > > > >> for
> > > > > > > >> >> >> >> > > documenting
> > > > > > > >> >> >> >> > > > > > > thread
> > > > > > > >> >> >> >> > > > > > > > > > safety.
> > > > > > > >> >> >> >> > > > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > > > Thoughts?
> > > > > > > >> >> >> >> > > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > > Definitely Class retention, not
> > > > Runtime.
> > > > > > > >> >> >> >> > > > > > > > > > You don't want to have to include
> > the
> > > > > > > annotation
> > > > > > > >> >> jar
> > > > > > > >> >> >> on
> > > > > > > >> >> >> >> the
> > > > > > > >> >> >> >> > > > > runtime
> > > > > > > >> >> >> >> > > > > > > > > > classpath.
> > > > > > > >> >> >> >> > > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > Hi Sebb,
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > Right now I have both of these
> > packages:
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> > > > > > > >> >> annotation.concurrent.clazz
> > > > > > > >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> > > > > > > >> >> >> annotation.concurrent.runtime
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > Each with a copy of:
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > GuardedBy
> > > > > > > >> >> >> >> > > > > > > > > Immutable
> > > > > > > >> >> >> >> > > > > > > > > NotThreadSafe
> > > > > > > >> >> >> >> > > > > > > > > ThreadSafe
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > Should we include what I have as
> is?
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > If we were to only provide the
> > annotation
> > > > > at
> > > > > > > the
> > > > > > > >> >> CLASS
> > > > > > > >> >> >> >> > > retention
> > > > > > > >> >> >> >> > > > > > level,
> > > > > > > >> >> >> >> > > > > > > > > should we still package them in
> > > > > > > >> >> >> >> > ...annotation.concurrent.clazz
> > > > > > > >> >> >> >> > > in
> > > > > > > >> >> >> >> > > > > > case
> > > > > > > >> >> >> >> > > > > > > we
> > > > > > > >> >> >> >> > > > > > > > > want to provide
> > > > > annotation.concurrent.runtime
> > > > > > > >> later?
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > If we know for certain we never
> want
> > to
> > > > > > provide
> > > > > > > >> >> RUNTIME
> > > > > > > >> >> >> >> > > > retention,
> > > > > > > >> >> >> >> > > > > we
> > > > > > > >> >> >> >> > > > > > > can
> > > > > > > >> >> >> >> > > > > > > > > put them all in
> annotation.concurrent
> > > > now.
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > Thoughts?
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > Gary
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > > [I don't know why the annotations
> > were
> > > > > ever
> > > > > > > >> >> considered
> > > > > > > >> >> >> >> > > suitable
> > > > > > > >> >> >> >> > > > > for
> > > > > > > >> >> >> >> > > > > > > > > > runtime]
> > > > > > > >> >> >> >> > > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > > > Gary
> > > > > > > >> >> >> >> > > > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > > > --
> > > > > > > >> >> >> >> > > > > > > > > > > E-Mail: garydgregory@gmail.com
> |
> > > > > > > >> >> >> ggregory@apache.org
> > > > > > > >> >> >> >> > > > > > > > > > > Java Persistence with
> Hibernate,
> > > > Second
> > > > > > > >> Edition
> > > > > > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > > > > > >> >> >> >> product/1617290459/ref=as_li_
> > > > > > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > > > >> >> >> >> 9325&creativeASIN=1617290459&
> > > > > > > >> >> >> >> > > > > > > > > >
> > > > > > > >> >> >> >> > > > > > >
> > > > > > > >> >> >> >> > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > > > >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2
> > > > > > > >> >> >> >> > > b8>
> > > > > > > >> >> >> >> > > > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > > > <http:////
> > > > > > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > > > > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > > > > > >> >> >> a=
> > > > > > > >> >> >> >> > > > > > > > > > 1617290459>
> > > > > > > >> >> >> >> > > > > > > > > > > JUnit in Action, Second Edition
> > > > > > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > > > > > >> >> >> >> product/1935182021/ref=as_li_
> > > > > > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > > > >> >> >> >> 9325&creativeASIN=1935182021&
> > > > > > > >> >> >> >> > > > > > > > > > linkCode=as2&tag=garygregory-
> > > > 20&linkId=
> > > > > > > >> >> >> >> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > > > >> >> >> >> > > > > > > > > 18%22
> > > > > > > >> >> >> >> > > > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > > > <http:////
> > > > > > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > > > > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > > > > > >> >> >> a=
> > > > > > > >> >> >> >> > > > > > > > > > 1935182021>
> > > > > > > >> >> >> >> > > > > > > > > > > Spring Batch in Action
> > > > > > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > > > > > >> >> >> >> product/1935182951/ref=as_li_
> > > > > > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > > > >> >> >> >> 9325&creativeASIN=1935182951&
> > > > > > > >> >> >> >> > > > > > > > > >
> > > > > > > >> >> >> >> > linkCode=%7B%7BlinkCode%7D%7D&
> > > > > > tag=garygregory-20&linkId=%7B%
> > > > > > > >> >> >> >> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+
> > > > > > Batch+in+Action>
> > > > > > > >> >> >> >> > > > > > > > > > > <http:////
> > > > > > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > > > > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > > > > > >> >> >> a=
> > > > > > > >> >> >> >> > > > > > > > > > 1935182951>
> > > > > > > >> >> >> >> > > > > > > > > > > Blog:
> > http://garygregory.wordpress
> > .
> > > > com
> > > > > > > >> >> >> >> > > > > > > > > > > Home: http://garygregory.com/
> > > > > > > >> >> >> >> > > > > > > > > > > Tweet!
> > > > http://twitter.com/GaryGregory
> > > > > > > >> >> >> >> > > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > >
> > > > > > > >> >> >> >> > ------------------------------
> > > > > > ------------------------------
> > > > > > > >> >> >> >> > > > > > > ---------
> > > > > > > >> >> >> >> > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > dev-unsubscribe@commons.
> > > > > > > >> >> >> >> apache.org
> > > > > > > >> >> >> >> > > > > > > > > > For additional commands, e-mail:
> > > > > > > >> >> >> >> > dev-help@commons.apache.org
> > > > > > > >> >> >> >> > > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > --
> > > > > > > >> >> >> >> > > > > > > > > E-Mail: garydgregory@gmail.com |
> > > > > > > >> ggregory@apache.org
> > > > > > > >> >> >> >> > > > > > > > > Java Persistence with Hibernate,
> > Second
> > > > > > Edition
> > > > > > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > > > > > >> >> >> product/1617290459/ref=as_li_
> > > > > > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > > > >> >> >> >> 9325&creativeASIN=1617290459&
> > > > > > > >> >> >> >> > > > > > > > >
> > linkCode=as2&tag=garygregory-20&linkId=
> > > > > > > >> >> >> >> > > > > > cadb800f39946ec62ea2b1af9fe6a2
> > > > > > > >> >> >> >> > > > > > > b8>
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> > > > > adsystem.com/e/ir?t=
> > > > > > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > > > > > >> >> >> >> > > > > > > > > 1617290459>
> > > > > > > >> >> >> >> > > > > > > > > JUnit in Action, Second Edition
> > > > > > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > > > > > >> >> >> product/1935182021/ref=as_li_
> > > > > > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > > > >> >> >> >> 9325&creativeASIN=1935182021&
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > linkCode=as2&tag=garygregory-
> 20&linkId=
> > > > > > > >> >> >> >> > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > > > >> >> >> >> > > > > > 18%22
> > > > > > > >> >> >> >> > > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> > > > > adsystem.com/e/ir?t=
> > > > > > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > > > > > >> >> >> >> > > > > > > > > 1935182021>
> > > > > > > >> >> >> >> > > > > > > > > Spring Batch in Action
> > > > > > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > > > > > >> >> >> product/1935182951/ref=as_li_
> > > > > > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > > > >> >> >> >> 9325&creativeASIN=1935182951&
> > > > > > > >> >> >> >> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
> > > > > > > >> >> >> >> tag=garygregory-20&linkId=%7B%
> > > > > > > >> >> >> >> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+
> > > > > Batch+in+Action>
> > > > > > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> > > > > adsystem.com/e/ir?t=
> > > > > > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > > > > > >> >> >> >> > > > > > > > > 1935182951>
> > > > > > > >> >> >> >> > > > > > > > > Blog: http://garygregory.wordpress
> .
> > com
> > > > > > > >> >> >> >> > > > > > > > > Home: http://garygregory.com/
> > > > > > > >> >> >> >> > > > > > > > > Tweet!
> > http://twitter.com/GaryGregory
> > > > > > > >> >> >> >> > > > > > > > >
> > > > > > > >> >> >> >> > > > > > > >
> > > > > > > >> >> >> >> > > > > > > >
> > > > > > > >> >> >> >> > > > > > > >
> > > > > > > >> >> >> >> > > > > > > > --
> > > > > > > >> >> >> >> > > > > > > > Matt Sicker <bo...@gmail.com>
> > > > > > > >> >> >> >> > > > > > >
> > > > > > > >> >> >> >> > > > > >
> > > > > > > >> >> >> >> > > > > >
> > > > > > > >> >> >> >> > > > > >
> > > > > > > >> >> >> >> > > > > > --
> > > > > > > >> >> >> >> > > > > > Matt Sicker <bo...@gmail.com>
> > > > > > > >> >> >> >> > > > > >
> > > > > > > >> >> >> >> > > > >
> > > > > > > >> >> >> >> > > > >
> > > > > > > >> >> >> >> > > > >
> > > > > > > >> >> >> >> > > > > --
> > > > > > > >> >> >> >> > > > > E-Mail: garydgregory@gmail.com |
> > > > > ggregory@apache.org
> > > > > > > >> >> >> >> > > > > Java Persistence with Hibernate, Second
> > Edition
> > > > > > > >> >> >> >> > > > > <
> > > > > > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > > > > > product/1617290459/ref=as_li_
> > > > > > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > > > > > 9325&creativeASIN=1617290459&
> > > > > > > >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > > > >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2b8
> > > > > > > >> >> >> >> > > > > >
> > > > > > > >> >> >> >> > > > >
> > > > > > > >> >> >> >> > > > > <http:////
> > > > > > > >> >> >> >> > > > >
> > > > > > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> > > > > ir?t=garygregory-20&l=am2&o=1&
> > > > > > > >> >> >> a=1617290459
> > > > > > > >> >> >> >> > > >
> > > > > > > >> >> >> >> > > > > JUnit in Action, Second Edition
> > > > > > > >> >> >> >> > > > > <
> > > > > > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > > > > > product/1935182021/ref=as_li_
> > > > > > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > > > > > 9325&creativeASIN=1935182021&
> > > > > > > >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > > > >> >> >> >> 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > > > >> >> >> >> > > 18%22
> > > > > > > >> >> >> >> > > > > >
> > > > > > > >> >> >> >> > > > >
> > > > > > > >> >> >> >> > > > > <http:////
> > > > > > > >> >> >> >> > > > >
> > > > > > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> > > > > ir?t=garygregory-20&l=am2&o=1&
> > > > > > > >> >> >> a=1935182021
> > > > > > > >> >> >> >> > > >
> > > > > > > >> >> >> >> > > > > Spring Batch in Action
> > > > > > > >> >> >> >> > > > > <
> > > > > > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > > > > > product/1935182951/ref=as_li_
> > > > > > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > > > > > 9325&creativeASIN=1935182951&
> > > > > > > >> >> >> >> > > > linkCode=%7B%7BlinkCode%7D%7D&
> > > > > > > >> tag=garygregory-20&linkId=%7B%
> > > > > > > >> >> >> >> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> > > > > > > >> >> >> >> > > > > >
> > > > > > > >> >> >> >> > > > > <http:////
> > > > > > > >> >> >> >> > > > >
> > > > > > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> > > > > ir?t=garygregory-20&l=am2&o=1&
> > > > > > > >> >> >> a=1935182951
> > > > > > > >> >> >> >> > > >
> > > > > > > >> >> >> >> > > > > Blog: http://garygregory.wordpress.com
> > > > > > > >> >> >> >> > > > > Home: http://garygregory.com/
> > > > > > > >> >> >> >> > > > > Tweet! http://twitter.com/GaryGregory
> > > > > > > >> >> >> >> > > > >
> > > > > > > >> >> >> >> > > >
> > > > > > > >> >> >> >> > >
> > > > > > > >> >> >> >> > >
> > > > > > > >> >> >> >> > >
> > > > > > > >> >> >> >> > > --
> > > > > > > >> >> >> >> > > Matt Sicker <bo...@gmail.com>
> > > > > > > >> >> >> >> > >
> > > > > > > >> >> >> >> >
> > > > > > > >> >> >> >>
> > > > > > > >> >> >> >
> > > > > > > >> >> >> >
> > > > > > > >> >> >> >
> > > > > > > >> >> >> > --
> > > > > > > >> >> >> > E-Mail: garydgregory@gmail.com |
> ggregory@apache.org
> > > > > > > >> >> >> > Java Persistence with Hibernate, Second Edition
> > > > > > > >> >> >> > <
> > https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > > > >> >> >>
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > > > >> >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > > > > >> cadb800f39946ec62ea2b1af9fe6a2
> > > > > > > >> >> b8>
> > > > > > > >> >> >> >
> > > > > > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > > >> >> garygregory-20&l=am2&o=1&a=
> > > > > > > >> >> >> 1617290459>
> > > > > > > >> >> >> > JUnit in Action, Second Edition
> > > > > > > >> >> >> > <
> > https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > > > >> >> >>
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > > > >> >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > > > > >> 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > > > >> >> 18%22
> > > > > > > >> >> >> >
> > > > > > > >> >> >> >
> > > > > > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > > >> >> garygregory-20&l=am2&o=1&a=
> > > > > > > >> >> >> 1935182021>
> > > > > > > >> >> >> > Spring Batch in Action
> > > > > > > >> >> >> > <
> > https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > > > >> >> >>
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > > > >> >> >> linkCode=%7B%7BlinkCode%7D%7D&
> > > > tag=garygregory-20&linkId=%7B%
> > > > > > > >> >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > > >> >> garygregory-20&l=am2&o=1&a=
> > > > > > > >> >> >> 1935182951>
> > > > > > > >> >> >> > Blog: http://garygregory.wordpress.com
> > > > > > > >> >> >> > Home: http://garygregory.com/
> > > > > > > >> >> >> > Tweet! http://twitter.com/GaryGregory
> > > > > > > >> >> >>
> > > > > > > >> >> >> ------------------------------
> > > > ------------------------------
> > > > > > > >> ---------
> > > > > > > >> >> >> To unsubscribe, e-mail:
> > dev-unsubscribe@commons.apache.org
> > > > > > > >> >> >> For additional commands, e-mail:
> > > > dev-help@commons.apache.org
> > > > > > > >> >> >>
> > > > > > > >> >> >>
> > > > > > > >> >> >
> > > > > > > >> >> >
> > > > > > > >> >> > --
> > > > > > > >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > > >> >> > Java Persistence with Hibernate, Second Edition
> > > > > > > >> >> > <https://www.amazon.com/gp/
> product/1617290459/ref=as_li_
> > > > > > > >> >> tl?ie=UTF8&camp=1789&creative=
> > 9325&creativeASIN=1617290459&
> > > > > > > >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > > > > cadb800f39946ec62ea2b1af9fe6a2
> > > > > > > >> b8>
> > > > > > > >> >> >
> > > > > > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > > >> garygregory-20&l=am2&o=1&a=
> > > > > > > >> >> 1617290459>
> > > > > > > >> >> > JUnit in Action, Second Edition
> > > > > > > >> >> > <https://www.amazon.com/gp/
> product/1935182021/ref=as_li_
> > > > > > > >> >> tl?ie=UTF8&camp=1789&creative=
> > 9325&creativeASIN=1935182021&
> > > > > > > >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > > > >> 18%22
> > > > > > > >> >> >
> > > > > > > >> >> >
> > > > > > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > > >> garygregory-20&l=am2&o=1&a=
> > > > > > > >> >> 1935182021>
> > > > > > > >> >> > Spring Batch in Action
> > > > > > > >> >> > <https://www.amazon.com/gp/
> product/1935182951/ref=as_li_
> > > > > > > >> >> tl?ie=UTF8&camp=1789&creative=
> > 9325&creativeASIN=1935182951&
> > > > > > > >> >> linkCode=%7B%7BlinkCode%7D%7D&
> > tag=garygregory-20&linkId=%7B%
> > > > > > > >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > > >> garygregory-20&l=am2&o=1&a=
> > > > > > > >> >> 1935182951>
> > > > > > > >> >> > Blog: http://garygregory.wordpress.com
> > > > > > > >> >> > Home: http://garygregory.com/
> > > > > > > >> >> > Tweet! http://twitter.com/GaryGregory
> > > > > > > >> >>
> > > > > > > >> >> ------------------------------
> > ------------------------------
> > > > > > > ---------
> > > > > > > >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.
> apache.org
> > > > > > > >> >> For additional commands, e-mail:
> > dev-help@commons.apache.org
> > > > > > > >> >>
> > > > > > > >> >>
> > > > > > > >> >
> > > > > > > >> >
> > > > > > > >> > --
> > > > > > > >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > > >> > Java Persistence with Hibernate, Second Edition
> > > > > > > >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > > > >> linkCode=as2&tag=garygregory-20&linkId=
> > > > > cadb800f39946ec62ea2b1af9fe6a2
> > > > > > > b8>
> > > > > > > >> >
> > > > > > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > > garygregory-20&l=am2&o=1&a=
> > > > > > > >> 1617290459>
> > > > > > > >> > JUnit in Action, Second Edition
> > > > > > > >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > > > >> linkCode=as2&tag=garygregory-20&linkId=
> > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > > > 18%22
> > > > > > > >> >
> > > > > > > >> >
> > > > > > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > > garygregory-20&l=am2&o=1&a=
> > > > > > > >> 1935182021>
> > > > > > > >> > Spring Batch in Action
> > > > > > > >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > > > >> linkCode=%7B%7BlinkCode%7D%7D&
> tag=garygregory-20&linkId=%7B%
> > > > > > > >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > > garygregory-20&l=am2&o=1&a=
> > > > > > > >> 1935182951>
> > > > > > > >> > Blog: http://garygregory.wordpress.com
> > > > > > > >> > Home: http://garygregory.com/
> > > > > > > >> > Tweet! http://twitter.com/GaryGregory
> > > > > > > >>
> > > > > > > >> ------------------------------
> ------------------------------
> > > > > ---------
> > > > > > > >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > > > > >> For additional commands, e-mail:
> dev-help@commons.apache.org
> > > > > > > >>
> > > > > > > >>
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > > > Java Persistence with Hibernate, Second Edition
> > > > > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > cadb800f39946ec62ea2b1af9fe6a2
> > > > > b8>
> > > > > > > >
> > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > garygregory-20&l=am2&o=1&a=
> > > > > > > 1617290459>
> > > > > > > > JUnit in Action, Second Edition
> > > > > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > > 18%22
> > > > > > > >
> > > > > > > >
> > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > garygregory-20&l=am2&o=1&a=
> > > > > > > 1935182021>
> > > > > > > > Spring Batch in Action
> > > > > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > garygregory-20&l=am2&o=1&a=
> > > > > > > 1935182951>
> > > > > > > > Blog: http://garygregory.wordpress.com
> > > > > > > > Home: http://garygregory.com/
> > > > > > > > Tweet! http://twitter.com/GaryGregory
> > > > > > >
> > > > > > > ------------------------------------------------------------
> > > > ---------
> > > > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > > > > For additional commands, e-mail: dev-help@commons.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Matt Sicker <bo...@gmail.com>
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Matt Sicker <bo...@gmail.com>
> >
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>

Re: [lang] Thread safety annotations

Posted by Matt Sicker <bo...@gmail.com>.
Well, HttpClient used to have the same (or similar) thread safety
annotations for documentation purposes, and I think they were just custom
annotations and not the javax ones.

On 27 November 2016 at 20:50, Gary Gregory <ga...@gmail.com> wrote:

> On Nov 27, 2016 6:46 PM, "Matt Sicker" <bo...@gmail.com> wrote:
> >
> > I'd be in favor of just including this as an internal annotation similar
> to
> > how it's done in HttpClient.
>
> What does that mean specifically? FWIW, I think those annotations might be
> gone in the current svn trunk.
>
> Gary
> >
> > On 27 November 2016 at 20:44, Gary Gregory <ga...@gmail.com>
> wrote:
> >
> > > I do not think we should use an official Java package because the JSR
> 305
> > > page says "The Executive Committee voted to list this JSR as dormant in
> May
> > > 2012."
> > >
> > > Gary
> > >
> > > On Nov 27, 2016 6:39 PM, "Matt Sicker" <bo...@gmail.com> wrote:
> > >
> > > > If you're going to share the annotations between projects, why not
> use a
> > > > JSR package for it like the google one? I thought the idea of
> embedding
> > > the
> > > > annotations in [lang] was to prevent the need for the dependency and
> to
> > > use
> > > > it internally, not as a public annotation for other projects to use.
> > > >
> > > > On 27 November 2016 at 19:55, Gary Gregory <ga...@gmail.com>
> > > wrote:
> > > >
> > > > > Are you suggesting [lang] becomes a multi-module project?
> > > > >
> > > > > Gary
> > > > >
> > > > > On Nov 27, 2016 5:01 PM, "sebb" <se...@gmail.com> wrote:
> > > > >
> > > > > > On 28 November 2016 at 00:11, Gary Gregory <
> garydgregory@gmail.com
> >
> > > > > wrote:
> > > > > > > On Sun, Nov 27, 2016 at 4:09 PM, sebb <se...@gmail.com>
> wrote:
> > > > > > >
> > > > > > >> On 27 November 2016 at 23:51, Gary Gregory <
> > > garydgregory@gmail.com>
> > > > > > wrote:
> > > > > > >> > On Sun, Nov 27, 2016 at 3:41 PM, sebb <se...@gmail.com>
> wrote:
> > > > > > >> >
> > > > > > >> >> On 27 November 2016 at 22:31, Gary Gregory <
> > > > garydgregory@gmail.com
> > > > > >
> > > > > > >> wrote:
> > > > > > >> >> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <se...@gmail.com>
> > > > wrote:
> > > > > > >> >> >
> > > > > > >> >> >> On 27 November 2016 at 22:03, Gary Gregory <
> > > > > > garydgregory@gmail.com>
> > > > > > >> >> wrote:
> > > > > > >> >> >> > These annotations are the SAME as have been published
> all
> > > > over
> > > > > > the
> > > > > > >> >> place,
> > > > > > >> >> >> > so I do not think we need a PR for review. Reviewing
> the
> > > > code
> > > > > in
> > > > > > >> the
> > > > > > >> >> repo
> > > > > > >> >> >> > should be enough, but I'm not sure _what_ there is to
> > > review
> > > > > > >> really.
> > > > > > >> >> I've
> > > > > > >> >> >> > already posted a link to the sources (a pastebin
> link).
> > > I'll
> > > > > > >> create a
> > > > > > >> >> >> Jira
> > > > > > >> >> >> > of course.
> > > > > > >> >> >>
> > > > > > >> >> >> There is one aspect that needs review: does the
> annotation
> > > > > belong
> > > > > > in
> > > > > > >> >> LANG?
> > > > > > >> >> >> If we want to use the annotation in other components, do
> > > they
> > > > > > have to
> > > > > > >> >> >> depend on LANG?
> > > > > > >> >> >>
> > > > > > >> >> >
> > > > > > >> >> > No see below and previous messages.
> > > > > > >> >> >
> > > > > > >> >> >
> > > > > > >> >> >> If not, do they all have their own copies?
> > > > > > >> >> >>
> > > > > > >> >> >
> > > > > > >> >> > No.
> > > > > > >> >> >
> > > > > > >> >> >
> > > > > > >> >> >>
> > > > > > >> >> >> And what happens when LANG needs a non-BC release?
> > > > > > >> >> >>
> > > > > > >> >> >
> > > > > > >> >> > What is the issue I am missing?
> > > > > > >> >> >
> > > > > > >> >>
> > > > > > >> >> The package name for the annotation might need to change
> > > > > > >> >> That would be a downstream nuisance.
> > > > > > >> >>
> > > > > > >> >
> > > > > > >> > Hi All,
> > > > > > >> >
> > > > > > >> > How is that different than changing the package name for any
> of
> > > > our
> > > > > > other
> > > > > > >> > lang types?
> > > > > > >>
> > > > > > >> It's not.
> > > > > > >>
> > > > > > >> > If you want move a package, you have to break BC and we have
> > > clear
> > > > > > >> > guidelines for that task.
> > > > > > >>
> > > > > > >> But why should I have to change package imports for
> annotations
> > > just
> > > > > > >> because they happen to be in LANG?
> > > > > > >>
> > > > > > >> Note that this could get confusing.
> > > > > > >>
> > > > > > >> Say XYZ component starts out only needing lang for the
> > > annotations.
> > > > > > >> So they include LANG 3.x and code the annotations.
> > > > > > >>
> > > > > > >> Later they find they want LANG 4.x for runtime.
> > > > > > >> They would then need to drop the LANG 3.x dependency, fix up
> all
> > > the
> > > > > > >> annotation imports etc.
> > > > > > >> Unnecessary work if the annotations were in a separate
> component.
> > > > > > >>
> > > > > > >> Also, any tool that wants to check the annotations will have
> to
> > > look
> > > > > > >> for them in lots of packages.
> > > > > > >>
> > > > > > >> Whilst it can no doubt be made to work, it's going to cause
> > > problems
> > > > > > later.
> > > > > > >>
> > > > > > >
> > > > > > > To be on the playful side, this is what my mother calls
> "borrowing
> > > > > > trouble"
> > > > > > > ;-)
> > > > > > >
> > > > > > > We can future-trip ourselves in all sorts of troubles. Our
> > > > imaginations
> > > > > > > know no bounds!  :-)
> > > > > >
> > > > > > This is not an imaginary scenario.
> > > > > >
> > > > > > We know that LANG will have a non-BC release at some point.
> > > > > > The plan is to allow non-LANG components to share the LANG
> > > annotations.
> > > > > > We know that components which originally don't need LANG may end
> up
> > > > > > needing LANG at run-time.
> > > > > > Therefore the problem will occur.
> > > > > >
> > > > > > In this case, "look before you leap" is appropriate.
> > > > > >
> > > > > > > Gary
> > > > > > >
> > > > > > >
> > > > > > >>
> > > > > > >> > Since already have a package called
> org.apache.commons.lang3.
> > > > > > concurrent,
> > > > > > >> I
> > > > > > >> > propose we place these annottaions in
> > > > > > >> > org.apache.commons.lang3.concurrent.annotation.
> > > > > > >> >
> > > > > > >> >
> > > > > > >> >> >>
> > > > > > >> >> >> My expectation for such annotations is that they would
> be
> > > > > > >> >> >> self-contained (or built-in to the languange, not LANG).
> > > > > > >> >> >>
> > > > > > >> >> >
> > > > > > >> >> > It is _because_ they are NOT built-in the language or JRE
> > > that
> > > > we
> > > > > > are
> > > > > > >> >> > proposing they belong in [lang].
> > > > > > >> >> >
> > > > > > >> >> > Since we are providing the annotation with CLASS
> retention
> > > only
> > > > > > >> >> > (initially), there is no hard dependency on [lang] at
> > > runtime.
> > > > > > >> >> >
> > > > > > >> >> > Is there some subtlety we are missing?
> > > > > > >> >>
> > > > > > >> >> Yes, the compile-time dependency.
> > > > > > >> >>
> > > > > > >> >
> > > > > > >> > No surprise, right? You can't use an annotation without
> > > compiling
> > > > > the
> > > > > > >> > source file.
> > > > > > >> >
> > > > > > >> >
> > > > > > >> >> AFAIK it's not possible to have a Maven compile-only
> > > dependency;
> > > > > > >> >> compile-time implies run-time.
> > > > > > >> >>
> > > > > > >> >
> > > > > > >> > That's a tooling issue of course which should not invalidate
> the
> > > > > > >> worthiness
> > > > > > >> > of this feature.
> > > > > > >> >
> > > > > > >> > If I am a downstream user of Commons Lang's new annotations,
> I
> > > > would
> > > > > > >> need a
> > > > > > >> > Maven scope that says "I need [lang] as a compile time only
> > > > > > dependency" I
> > > > > > >> > do not see such a scope on
> > > > > > >> > https://maven.apache.org/guides/introduction/
> > > > > > introduction-to-dependency-
> > > > > > >> mechanism.html#Dependency_Scope
> > > > > > >> >
> > > > > > >> > Time for a Jira!
> > > > > > >> >
> > > > > > >> > I wonder what Gradle offers users in this dept.?
> > > > > > >> >
> > > > > > >> > Gary
> > > > > > >> >
> > > > > > >> >
> > > > > > >> >>
> > > > > > >> >> > Gary
> > > > > > >> >> >
> > > > > > >> >> >
> > > > > > >> >> >> > Gary
> > > > > > >> >> >> >
> > > > > > >> >> >> > On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <
> > > > > > >> britter@apache.org>
> > > > > > >> >> >> wrote:
> > > > > > >> >> >> >
> > > > > > >> >> >> >> Hi,
> > > > > > >> >> >> >>
> > > > > > >> >> >> >> Gary Gregory <ga...@gmail.com> schrieb am
> So.,
> > > 27.
> > > > > Nov.
> > > > > > >> 2016
> > > > > > >> >> um
> > > > > > >> >> >> >> 21:01 Uhr:
> > > > > > >> >> >> >>
> > > > > > >> >> >> >> > So let's start with the CLASS retention annotations
> > > > first.
> > > > > > I'll
> > > > > > >> >> commit
> > > > > > >> >> >> >> > later today.
> > > > > > >> >> >> >> >
> > > > > > >> >> >> >>
> > > > > > >> >> >> >> Maybe create a GitHub PR so people can have a look
> before
> > > > it
> > > > > > goes
> > > > > > >> to
> > > > > > >> >> >> >> master?
> > > > > > >> >> >> >>
> > > > > > >> >> >> >> Benedikt
> > > > > > >> >> >> >>
> > > > > > >> >> >> >>
> > > > > > >> >> >> >> >
> > > > > > >> >> >> >> > Gary
> > > > > > >> >> >> >> >
> > > > > > >> >> >> >> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <
> > > boards@gmail.com
> > > > >
> > > > > > >> wrote:
> > > > > > >> >> >> >> >
> > > > > > >> >> >> >> > > I feel like documenting thread safety in such a
> low
> > > > > level,
> > > > > > >> widely
> > > > > > >> >> >> used
> > > > > > >> >> >> >> > > library like [lang] is a great idea. Whether it
> uses
> > > > > > >> annotations,
> > > > > > >> >> >> >> > javadocs,
> > > > > > >> >> >> >> > > or some sort of informal javadoc comments isn't
> too
> > > > big a
> > > > > > >> deal to
> > > > > > >> >> >> me,
> > > > > > >> >> >> >> but
> > > > > > >> >> >> >> > > providing some guarantees of thread safety or
> lack
> > > > > thereof
> > > > > > >> would
> > > > > > >> >> be
> > > > > > >> >> >> >> > > invaluable information.
> > > > > > >> >> >> >> > >
> > > > > > >> >> >> >> > > On 27 November 2016 at 07:11, Benedikt Ritter <
> > > > > > >> >> britter@apache.org>
> > > > > > >> >> >> >> > wrote:
> > > > > > >> >> >> >> > >
> > > > > > >> >> >> >> > > > I thought we decided to abstain from
> documenting
> > > > thread
> > > > > > >> safety
> > > > > > >> >> >> since
> > > > > > >> >> >> >> it
> > > > > > >> >> >> >> > > > would get outdated quickly anyway.
> > > > > > >> >> >> >> > > >
> > > > > > >> >> >> >> > > > Gary Gregory <ga...@gmail.com> schrieb
> am
> > > > So.,
> > > > > > 27.
> > > > > > >> Nov.
> > > > > > >> >> >> 2016
> > > > > > >> >> >> >> um
> > > > > > >> >> >> >> > > > 09:11 Uhr:
> > > > > > >> >> >> >> > > >
> > > > > > >> >> >> >> > > > > But if we then want a runtime version we had
> an
> > > odd
> > > > > > >> packaging
> > > > > > >> >> >> with
> > > > > > >> >> >> >> > > CLASS
> > > > > > >> >> >> >> > > > > retention in .concurrent. and RUNTIME in
> > > > > > >> .concurrent.runtime.
> > > > > > >> >> >> >> > > > >
> > > > > > >> >> >> >> > > > > I might be in YAGNI territory here...
> > > > > > >> >> >> >> > > > >
> > > > > > >> >> >> >> > > > > Gary
> > > > > > >> >> >> >> > > > >
> > > > > > >> >> >> >> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker
> <
> > > > > > >> >> boards@gmail.com
> > > > > > >> >> >> >
> > > > > > >> >> >> >> > > wrote:
> > > > > > >> >> >> >> > > > >
> > > > > > >> >> >> >> > > > > > I think adding the additional clazz/runtime
> > > > package
> > > > > > >> would
> > > > > > >> >> be a
> > > > > > >> >> >> >> > little
> > > > > > >> >> >> >> > > > > > overkill if you only include one packaging
> > > option
> > > > > for
> > > > > > >> now.
> > > > > > >> >> >> >> > > > > >
> > > > > > >> >> >> >> > > > > > On 27 November 2016 at 00:04, Gary Gregory
> <
> > > > > > >> >> >> >> garydgregory@gmail.com
> > > > > > >> >> >> >> > >
> > > > > > >> >> >> >> > > > > wrote:
> > > > > > >> >> >> >> > > > > >
> > > > > > >> >> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <
> > > > > > >> boards@gmail.com
> > > > > > >> >> >
> > > > > > >> >> >> >> wrote:
> > > > > > >> >> >> >> > > > > > > >
> > > > > > >> >> >> >> > > > > > > > I can think of a couple use cases for
> > > runtime
> > > > > > >> retention
> > > > > > >> >> >> for
> > > > > > >> >> >> >> > > thread
> > > > > > >> >> >> >> > > > > > safety
> > > > > > >> >> >> >> > > > > > > > annotations, but they're not specific
> to
> > > > > commons
> > > > > > >> lang.
> > > > > > >> >> >> >> > > > > > > >
> > > > > > >> >> >> >> > > > > > > > 1. A framework could choose what type
> of
> > > data
> > > > > > >> >> structure or
> > > > > > >> >> >> >> > > > algorithm
> > > > > > >> >> >> >> > > > > to
> > > > > > >> >> >> >> > > > > > > use
> > > > > > >> >> >> >> > > > > > > > at runtime based on the presence of
> which
> > > > > thread
> > > > > > >> safety
> > > > > > >> >> >> >> > > annotation
> > > > > > >> >> >> >> > > > is
> > > > > > >> >> >> >> > > > > > on.
> > > > > > >> >> >> >> > > > > > > > Same for mutability.
> > > > > > >> >> >> >> > > > > > > > 2. A testing framework could use these
> > > > > > annotations
> > > > > > >> to
> > > > > > >> >> try
> > > > > > >> >> >> and
> > > > > > >> >> >> >> > > > > automate
> > > > > > >> >> >> >> > > > > > > some
> > > > > > >> >> >> >> > > > > > > > sort of thread safety tests, though
> that
> > > > sounds
> > > > > > >> like a
> > > > > > >> >> >> hard
> > > > > > >> >> >> >> > > problem
> > > > > > >> >> >> >> > > > > to
> > > > > > >> >> >> >> > > > > > > > actually implement.
> > > > > > >> >> >> >> > > > > > > >
> > > > > > >> >> >> >> > > > > > > > However, it'd be easier to just start
> with
> > > > > class
> > > > > > >> >> retention
> > > > > > >> >> >> >> (or
> > > > > > >> >> >> >> > > > source
> > > > > > >> >> >> >> > > > > > > > retention) just for documentation
> purposes.
> > > > > > Higher
> > > > > > >> >> >> retention
> > > > > > >> >> >> >> > > levels
> > > > > > >> >> >> >> > > > > > could
> > > > > > >> >> >> >> > > > > > > > be added later if an important use case
> > > came
> > > > > up.
> > > > > > >> >> >> >> > > > > > >
> > > > > > >> >> >> >> > > > > > > But which packaging option?
> > > > > > >> >> >> >> > > > > > >
> > > > > > >> >> >> >> > > > > > > Gary
> > > > > > >> >> >> >> > > > > > > >
> > > > > > >> >> >> >> > > > > > > > On 26 November 2016 at 19:56, Gary
> Gregory
> > > <
> > > > > > >> >> >> >> > > garydgregory@gmail.com
> > > > > > >> >> >> >> > > > >
> > > > > > >> >> >> >> > > > > > > wrote:
> > > > > > >> >> >> >> > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb
> <
> > > > > > >> >> sebbaz@gmail.com
> > > > > > >> >> >> >
> > > > > > >> >> >> >> > > wrote:
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary
> > > > Gregory
> > > > > <
> > > > > > >> >> >> >> > > > > garydgregory@gmail.com
> > > > > > >> >> >> >> > > > > > >
> > > > > > >> >> >> >> > > > > > > > > wrote:
> > > > > > >> >> >> >> > > > > > > > > > > On a [crypto] thread, I mentioned
> > > > > > >> >> >> >> > > > http://pastebin.com/RKPGGdJ9
> > > > > > >> >> >> >> > > > > > to
> > > > > > >> >> >> >> > > > > > > add
> > > > > > >> >> >> >> > > > > > > > > > the
> > > > > > >> >> >> >> > > > > > > > > > > "classic" four
> > > > > javax.annotation.concurrent
> > > > > > >> >> >> annotations
> > > > > > >> >> >> >> to
> > > > > > >> >> >> >> > > two
> > > > > > >> >> >> >> > > > > > > packages
> > > > > > >> >> >> >> > > > > > > > > > > (.clazz and .runtime) in Commons
> Lang
> > > > for
> > > > > > >> CLASS
> > > > > > >> >> and
> > > > > > >> >> >> >> > RUNTIME
> > > > > > >> >> >> >> > > > > > > retentions.
> > > > > > >> >> >> >> > > > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > > > You'd use the CLASS version to
> avoid
> > > a
> > > > > hard
> > > > > > >> >> >> dependency
> > > > > > >> >> >> >> on
> > > > > > >> >> >> >> > > > > [lang].
> > > > > > >> >> >> >> > > > > > > > > RUNTIME
> > > > > > >> >> >> >> > > > > > > > > > > to keep them around.
> > > > > > >> >> >> >> > > > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > > > We'd use the CLASS versions in
> all of
> > > > > > Commons
> > > > > > >> for
> > > > > > >> >> >> >> > > documenting
> > > > > > >> >> >> >> > > > > > > thread
> > > > > > >> >> >> >> > > > > > > > > > safety.
> > > > > > >> >> >> >> > > > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > > > Thoughts?
> > > > > > >> >> >> >> > > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > > Definitely Class retention, not
> > > Runtime.
> > > > > > >> >> >> >> > > > > > > > > > You don't want to have to include
> the
> > > > > > annotation
> > > > > > >> >> jar
> > > > > > >> >> >> on
> > > > > > >> >> >> >> the
> > > > > > >> >> >> >> > > > > runtime
> > > > > > >> >> >> >> > > > > > > > > > classpath.
> > > > > > >> >> >> >> > > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > Hi Sebb,
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > Right now I have both of these
> packages:
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> > > > > > >> >> annotation.concurrent.clazz
> > > > > > >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> > > > > > >> >> >> annotation.concurrent.runtime
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > Each with a copy of:
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > GuardedBy
> > > > > > >> >> >> >> > > > > > > > > Immutable
> > > > > > >> >> >> >> > > > > > > > > NotThreadSafe
> > > > > > >> >> >> >> > > > > > > > > ThreadSafe
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > Should we include what I have as is?
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > If we were to only provide the
> annotation
> > > > at
> > > > > > the
> > > > > > >> >> CLASS
> > > > > > >> >> >> >> > > retention
> > > > > > >> >> >> >> > > > > > level,
> > > > > > >> >> >> >> > > > > > > > > should we still package them in
> > > > > > >> >> >> >> > ...annotation.concurrent.clazz
> > > > > > >> >> >> >> > > in
> > > > > > >> >> >> >> > > > > > case
> > > > > > >> >> >> >> > > > > > > we
> > > > > > >> >> >> >> > > > > > > > > want to provide
> > > > annotation.concurrent.runtime
> > > > > > >> later?
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > If we know for certain we never want
> to
> > > > > provide
> > > > > > >> >> RUNTIME
> > > > > > >> >> >> >> > > > retention,
> > > > > > >> >> >> >> > > > > we
> > > > > > >> >> >> >> > > > > > > can
> > > > > > >> >> >> >> > > > > > > > > put them all in annotation.concurrent
> > > now.
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > Thoughts?
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > Gary
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > > [I don't know why the annotations
> were
> > > > ever
> > > > > > >> >> considered
> > > > > > >> >> >> >> > > suitable
> > > > > > >> >> >> >> > > > > for
> > > > > > >> >> >> >> > > > > > > > > > runtime]
> > > > > > >> >> >> >> > > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > > > Gary
> > > > > > >> >> >> >> > > > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > > > --
> > > > > > >> >> >> >> > > > > > > > > > > E-Mail: garydgregory@gmail.com |
> > > > > > >> >> >> ggregory@apache.org
> > > > > > >> >> >> >> > > > > > > > > > > Java Persistence with Hibernate,
> > > Second
> > > > > > >> Edition
> > > > > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > > > > >> >> >> >> product/1617290459/ref=as_li_
> > > > > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > > >> >> >> >> 9325&creativeASIN=1617290459&
> > > > > > >> >> >> >> > > > > > > > > >
> > > > > > >> >> >> >> > > > > > >
> > > > > > >> >> >> >> > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > > >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2
> > > > > > >> >> >> >> > > b8>
> > > > > > >> >> >> >> > > > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > > > <http:////
> > > > > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > > > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > > > > >> >> >> a=
> > > > > > >> >> >> >> > > > > > > > > > 1617290459>
> > > > > > >> >> >> >> > > > > > > > > > > JUnit in Action, Second Edition
> > > > > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > > > > >> >> >> >> product/1935182021/ref=as_li_
> > > > > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > > >> >> >> >> 9325&creativeASIN=1935182021&
> > > > > > >> >> >> >> > > > > > > > > > linkCode=as2&tag=garygregory-
> > > 20&linkId=
> > > > > > >> >> >> >> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > > >> >> >> >> > > > > > > > > 18%22
> > > > > > >> >> >> >> > > > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > > > <http:////
> > > > > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > > > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > > > > >> >> >> a=
> > > > > > >> >> >> >> > > > > > > > > > 1935182021>
> > > > > > >> >> >> >> > > > > > > > > > > Spring Batch in Action
> > > > > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > > > > >> >> >> >> product/1935182951/ref=as_li_
> > > > > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > > >> >> >> >> 9325&creativeASIN=1935182951&
> > > > > > >> >> >> >> > > > > > > > > >
> > > > > > >> >> >> >> > linkCode=%7B%7BlinkCode%7D%7D&
> > > > > tag=garygregory-20&linkId=%7B%
> > > > > > >> >> >> >> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+
> > > > > Batch+in+Action>
> > > > > > >> >> >> >> > > > > > > > > > > <http:////
> > > > > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > > > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > > > > >> >> >> a=
> > > > > > >> >> >> >> > > > > > > > > > 1935182951>
> > > > > > >> >> >> >> > > > > > > > > > > Blog:
> http://garygregory.wordpress
> .
> > > com
> > > > > > >> >> >> >> > > > > > > > > > > Home: http://garygregory.com/
> > > > > > >> >> >> >> > > > > > > > > > > Tweet!
> > > http://twitter.com/GaryGregory
> > > > > > >> >> >> >> > > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > >
> > > > > > >> >> >> >> > ------------------------------
> > > > > ------------------------------
> > > > > > >> >> >> >> > > > > > > ---------
> > > > > > >> >> >> >> > > > > > > > > > To unsubscribe, e-mail:
> > > > > > dev-unsubscribe@commons.
> > > > > > >> >> >> >> apache.org
> > > > > > >> >> >> >> > > > > > > > > > For additional commands, e-mail:
> > > > > > >> >> >> >> > dev-help@commons.apache.org
> > > > > > >> >> >> >> > > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > --
> > > > > > >> >> >> >> > > > > > > > > E-Mail: garydgregory@gmail.com |
> > > > > > >> ggregory@apache.org
> > > > > > >> >> >> >> > > > > > > > > Java Persistence with Hibernate,
> Second
> > > > > Edition
> > > > > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > > > > >> >> >> product/1617290459/ref=as_li_
> > > > > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > > >> >> >> >> 9325&creativeASIN=1617290459&
> > > > > > >> >> >> >> > > > > > > > >
> linkCode=as2&tag=garygregory-20&linkId=
> > > > > > >> >> >> >> > > > > > cadb800f39946ec62ea2b1af9fe6a2
> > > > > > >> >> >> >> > > > > > > b8>
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> > > > adsystem.com/e/ir?t=
> > > > > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > > > > >> >> >> >> > > > > > > > > 1617290459>
> > > > > > >> >> >> >> > > > > > > > > JUnit in Action, Second Edition
> > > > > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > > > > >> >> >> product/1935182021/ref=as_li_
> > > > > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > > >> >> >> >> 9325&creativeASIN=1935182021&
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > > >> >> >> >> > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > > >> >> >> >> > > > > > 18%22
> > > > > > >> >> >> >> > > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> > > > adsystem.com/e/ir?t=
> > > > > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > > > > >> >> >> >> > > > > > > > > 1935182021>
> > > > > > >> >> >> >> > > > > > > > > Spring Batch in Action
> > > > > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > > > > >> >> >> product/1935182951/ref=as_li_
> > > > > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > > >> >> >> >> 9325&creativeASIN=1935182951&
> > > > > > >> >> >> >> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
> > > > > > >> >> >> >> tag=garygregory-20&linkId=%7B%
> > > > > > >> >> >> >> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+
> > > > Batch+in+Action>
> > > > > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> > > > adsystem.com/e/ir?t=
> > > > > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > > > > >> >> >> >> > > > > > > > > 1935182951>
> > > > > > >> >> >> >> > > > > > > > > Blog: http://garygregory.wordpress.
> com
> > > > > > >> >> >> >> > > > > > > > > Home: http://garygregory.com/
> > > > > > >> >> >> >> > > > > > > > > Tweet!
> http://twitter.com/GaryGregory
> > > > > > >> >> >> >> > > > > > > > >
> > > > > > >> >> >> >> > > > > > > >
> > > > > > >> >> >> >> > > > > > > >
> > > > > > >> >> >> >> > > > > > > >
> > > > > > >> >> >> >> > > > > > > > --
> > > > > > >> >> >> >> > > > > > > > Matt Sicker <bo...@gmail.com>
> > > > > > >> >> >> >> > > > > > >
> > > > > > >> >> >> >> > > > > >
> > > > > > >> >> >> >> > > > > >
> > > > > > >> >> >> >> > > > > >
> > > > > > >> >> >> >> > > > > > --
> > > > > > >> >> >> >> > > > > > Matt Sicker <bo...@gmail.com>
> > > > > > >> >> >> >> > > > > >
> > > > > > >> >> >> >> > > > >
> > > > > > >> >> >> >> > > > >
> > > > > > >> >> >> >> > > > >
> > > > > > >> >> >> >> > > > > --
> > > > > > >> >> >> >> > > > > E-Mail: garydgregory@gmail.com |
> > > > ggregory@apache.org
> > > > > > >> >> >> >> > > > > Java Persistence with Hibernate, Second
> Edition
> > > > > > >> >> >> >> > > > > <
> > > > > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > > > > product/1617290459/ref=as_li_
> > > > > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > > > > 9325&creativeASIN=1617290459&
> > > > > > >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > > >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2b8
> > > > > > >> >> >> >> > > > > >
> > > > > > >> >> >> >> > > > >
> > > > > > >> >> >> >> > > > > <http:////
> > > > > > >> >> >> >> > > > >
> > > > > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> > > > ir?t=garygregory-20&l=am2&o=1&
> > > > > > >> >> >> a=1617290459
> > > > > > >> >> >> >> > > >
> > > > > > >> >> >> >> > > > > JUnit in Action, Second Edition
> > > > > > >> >> >> >> > > > > <
> > > > > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > > > > product/1935182021/ref=as_li_
> > > > > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > > > > 9325&creativeASIN=1935182021&
> > > > > > >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > > >> >> >> >> 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > > >> >> >> >> > > 18%22
> > > > > > >> >> >> >> > > > > >
> > > > > > >> >> >> >> > > > >
> > > > > > >> >> >> >> > > > > <http:////
> > > > > > >> >> >> >> > > > >
> > > > > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> > > > ir?t=garygregory-20&l=am2&o=1&
> > > > > > >> >> >> a=1935182021
> > > > > > >> >> >> >> > > >
> > > > > > >> >> >> >> > > > > Spring Batch in Action
> > > > > > >> >> >> >> > > > > <
> > > > > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > > > > product/1935182951/ref=as_li_
> > > > > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > > > > 9325&creativeASIN=1935182951&
> > > > > > >> >> >> >> > > > linkCode=%7B%7BlinkCode%7D%7D&
> > > > > > >> tag=garygregory-20&linkId=%7B%
> > > > > > >> >> >> >> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> > > > > > >> >> >> >> > > > > >
> > > > > > >> >> >> >> > > > > <http:////
> > > > > > >> >> >> >> > > > >
> > > > > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> > > > ir?t=garygregory-20&l=am2&o=1&
> > > > > > >> >> >> a=1935182951
> > > > > > >> >> >> >> > > >
> > > > > > >> >> >> >> > > > > Blog: http://garygregory.wordpress.com
> > > > > > >> >> >> >> > > > > Home: http://garygregory.com/
> > > > > > >> >> >> >> > > > > Tweet! http://twitter.com/GaryGregory
> > > > > > >> >> >> >> > > > >
> > > > > > >> >> >> >> > > >
> > > > > > >> >> >> >> > >
> > > > > > >> >> >> >> > >
> > > > > > >> >> >> >> > >
> > > > > > >> >> >> >> > > --
> > > > > > >> >> >> >> > > Matt Sicker <bo...@gmail.com>
> > > > > > >> >> >> >> > >
> > > > > > >> >> >> >> >
> > > > > > >> >> >> >>
> > > > > > >> >> >> >
> > > > > > >> >> >> >
> > > > > > >> >> >> >
> > > > > > >> >> >> > --
> > > > > > >> >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > >> >> >> > Java Persistence with Hibernate, Second Edition
> > > > > > >> >> >> > <
> https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > > >> >> >>
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > > >> >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > > > >> cadb800f39946ec62ea2b1af9fe6a2
> > > > > > >> >> b8>
> > > > > > >> >> >> >
> > > > > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > >> >> garygregory-20&l=am2&o=1&a=
> > > > > > >> >> >> 1617290459>
> > > > > > >> >> >> > JUnit in Action, Second Edition
> > > > > > >> >> >> > <
> https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > > >> >> >>
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > > >> >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > > > >> 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > > >> >> 18%22
> > > > > > >> >> >> >
> > > > > > >> >> >> >
> > > > > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > >> >> garygregory-20&l=am2&o=1&a=
> > > > > > >> >> >> 1935182021>
> > > > > > >> >> >> > Spring Batch in Action
> > > > > > >> >> >> > <
> https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > > >> >> >>
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > > >> >> >> linkCode=%7B%7BlinkCode%7D%7D&
> > > tag=garygregory-20&linkId=%7B%
> > > > > > >> >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > >> >> garygregory-20&l=am2&o=1&a=
> > > > > > >> >> >> 1935182951>
> > > > > > >> >> >> > Blog: http://garygregory.wordpress.com
> > > > > > >> >> >> > Home: http://garygregory.com/
> > > > > > >> >> >> > Tweet! http://twitter.com/GaryGregory
> > > > > > >> >> >>
> > > > > > >> >> >> ------------------------------
> > > ------------------------------
> > > > > > >> ---------
> > > > > > >> >> >> To unsubscribe, e-mail:
> dev-unsubscribe@commons.apache.org
> > > > > > >> >> >> For additional commands, e-mail:
> > > dev-help@commons.apache.org
> > > > > > >> >> >>
> > > > > > >> >> >>
> > > > > > >> >> >
> > > > > > >> >> >
> > > > > > >> >> > --
> > > > > > >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > >> >> > Java Persistence with Hibernate, Second Edition
> > > > > > >> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > > >> >> tl?ie=UTF8&camp=1789&creative=
> 9325&creativeASIN=1617290459&
> > > > > > >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > > > cadb800f39946ec62ea2b1af9fe6a2
> > > > > > >> b8>
> > > > > > >> >> >
> > > > > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > >> garygregory-20&l=am2&o=1&a=
> > > > > > >> >> 1617290459>
> > > > > > >> >> > JUnit in Action, Second Edition
> > > > > > >> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > > >> >> tl?ie=UTF8&camp=1789&creative=
> 9325&creativeASIN=1935182021&
> > > > > > >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > > >> 18%22
> > > > > > >> >> >
> > > > > > >> >> >
> > > > > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > >> garygregory-20&l=am2&o=1&a=
> > > > > > >> >> 1935182021>
> > > > > > >> >> > Spring Batch in Action
> > > > > > >> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > > >> >> tl?ie=UTF8&camp=1789&creative=
> 9325&creativeASIN=1935182951&
> > > > > > >> >> linkCode=%7B%7BlinkCode%7D%7D&
> tag=garygregory-20&linkId=%7B%
> > > > > > >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > >> garygregory-20&l=am2&o=1&a=
> > > > > > >> >> 1935182951>
> > > > > > >> >> > Blog: http://garygregory.wordpress.com
> > > > > > >> >> > Home: http://garygregory.com/
> > > > > > >> >> > Tweet! http://twitter.com/GaryGregory
> > > > > > >> >>
> > > > > > >> >> ------------------------------
> ------------------------------
> > > > > > ---------
> > > > > > >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > > > >> >> For additional commands, e-mail:
> dev-help@commons.apache.org
> > > > > > >> >>
> > > > > > >> >>
> > > > > > >> >
> > > > > > >> >
> > > > > > >> > --
> > > > > > >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > >> > Java Persistence with Hibernate, Second Edition
> > > > > > >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > > >> linkCode=as2&tag=garygregory-20&linkId=
> > > > cadb800f39946ec62ea2b1af9fe6a2
> > > > > > b8>
> > > > > > >> >
> > > > > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > garygregory-20&l=am2&o=1&a=
> > > > > > >> 1617290459>
> > > > > > >> > JUnit in Action, Second Edition
> > > > > > >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > > >> linkCode=as2&tag=garygregory-20&linkId=
> > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > > 18%22
> > > > > > >> >
> > > > > > >> >
> > > > > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > garygregory-20&l=am2&o=1&a=
> > > > > > >> 1935182021>
> > > > > > >> > Spring Batch in Action
> > > > > > >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > > >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > > >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > garygregory-20&l=am2&o=1&a=
> > > > > > >> 1935182951>
> > > > > > >> > Blog: http://garygregory.wordpress.com
> > > > > > >> > Home: http://garygregory.com/
> > > > > > >> > Tweet! http://twitter.com/GaryGregory
> > > > > > >>
> > > > > > >> ------------------------------------------------------------
> > > > ---------
> > > > > > >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > > > >> For additional commands, e-mail: dev-help@commons.apache.org
> > > > > > >>
> > > > > > >>
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > > Java Persistence with Hibernate, Second Edition
> > > > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > cadb800f39946ec62ea2b1af9fe6a2
> > > > b8>
> > > > > > >
> > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > garygregory-20&l=am2&o=1&a=
> > > > > > 1617290459>
> > > > > > > JUnit in Action, Second Edition
> > > > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > 18%22
> > > > > > >
> > > > > > >
> > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > garygregory-20&l=am2&o=1&a=
> > > > > > 1935182021>
> > > > > > > Spring Batch in Action
> > > > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > garygregory-20&l=am2&o=1&a=
> > > > > > 1935182951>
> > > > > > > Blog: http://garygregory.wordpress.com
> > > > > > > Home: http://garygregory.com/
> > > > > > > Tweet! http://twitter.com/GaryGregory
> > > > > >
> > > > > > ------------------------------------------------------------
> > > ---------
> > > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > > > For additional commands, e-mail: dev-help@commons.apache.org
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Matt Sicker <bo...@gmail.com>
> > > >
> > >
> >
> >
> >
> > --
> > Matt Sicker <bo...@gmail.com>
>



-- 
Matt Sicker <bo...@gmail.com>

Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
On Nov 27, 2016 6:46 PM, "Matt Sicker" <bo...@gmail.com> wrote:
>
> I'd be in favor of just including this as an internal annotation similar
to
> how it's done in HttpClient.

What does that mean specifically? FWIW, I think those annotations might be
gone in the current svn trunk.

Gary
>
> On 27 November 2016 at 20:44, Gary Gregory <ga...@gmail.com> wrote:
>
> > I do not think we should use an official Java package because the JSR
305
> > page says "The Executive Committee voted to list this JSR as dormant in
May
> > 2012."
> >
> > Gary
> >
> > On Nov 27, 2016 6:39 PM, "Matt Sicker" <bo...@gmail.com> wrote:
> >
> > > If you're going to share the annotations between projects, why not
use a
> > > JSR package for it like the google one? I thought the idea of
embedding
> > the
> > > annotations in [lang] was to prevent the need for the dependency and
to
> > use
> > > it internally, not as a public annotation for other projects to use.
> > >
> > > On 27 November 2016 at 19:55, Gary Gregory <ga...@gmail.com>
> > wrote:
> > >
> > > > Are you suggesting [lang] becomes a multi-module project?
> > > >
> > > > Gary
> > > >
> > > > On Nov 27, 2016 5:01 PM, "sebb" <se...@gmail.com> wrote:
> > > >
> > > > > On 28 November 2016 at 00:11, Gary Gregory <garydgregory@gmail.com
>
> > > > wrote:
> > > > > > On Sun, Nov 27, 2016 at 4:09 PM, sebb <se...@gmail.com> wrote:
> > > > > >
> > > > > >> On 27 November 2016 at 23:51, Gary Gregory <
> > garydgregory@gmail.com>
> > > > > wrote:
> > > > > >> > On Sun, Nov 27, 2016 at 3:41 PM, sebb <se...@gmail.com>
wrote:
> > > > > >> >
> > > > > >> >> On 27 November 2016 at 22:31, Gary Gregory <
> > > garydgregory@gmail.com
> > > > >
> > > > > >> wrote:
> > > > > >> >> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <se...@gmail.com>
> > > wrote:
> > > > > >> >> >
> > > > > >> >> >> On 27 November 2016 at 22:03, Gary Gregory <
> > > > > garydgregory@gmail.com>
> > > > > >> >> wrote:
> > > > > >> >> >> > These annotations are the SAME as have been published
all
> > > over
> > > > > the
> > > > > >> >> place,
> > > > > >> >> >> > so I do not think we need a PR for review. Reviewing
the
> > > code
> > > > in
> > > > > >> the
> > > > > >> >> repo
> > > > > >> >> >> > should be enough, but I'm not sure _what_ there is to
> > review
> > > > > >> really.
> > > > > >> >> I've
> > > > > >> >> >> > already posted a link to the sources (a pastebin link).
> > I'll
> > > > > >> create a
> > > > > >> >> >> Jira
> > > > > >> >> >> > of course.
> > > > > >> >> >>
> > > > > >> >> >> There is one aspect that needs review: does the
annotation
> > > > belong
> > > > > in
> > > > > >> >> LANG?
> > > > > >> >> >> If we want to use the annotation in other components, do
> > they
> > > > > have to
> > > > > >> >> >> depend on LANG?
> > > > > >> >> >>
> > > > > >> >> >
> > > > > >> >> > No see below and previous messages.
> > > > > >> >> >
> > > > > >> >> >
> > > > > >> >> >> If not, do they all have their own copies?
> > > > > >> >> >>
> > > > > >> >> >
> > > > > >> >> > No.
> > > > > >> >> >
> > > > > >> >> >
> > > > > >> >> >>
> > > > > >> >> >> And what happens when LANG needs a non-BC release?
> > > > > >> >> >>
> > > > > >> >> >
> > > > > >> >> > What is the issue I am missing?
> > > > > >> >> >
> > > > > >> >>
> > > > > >> >> The package name for the annotation might need to change
> > > > > >> >> That would be a downstream nuisance.
> > > > > >> >>
> > > > > >> >
> > > > > >> > Hi All,
> > > > > >> >
> > > > > >> > How is that different than changing the package name for any
of
> > > our
> > > > > other
> > > > > >> > lang types?
> > > > > >>
> > > > > >> It's not.
> > > > > >>
> > > > > >> > If you want move a package, you have to break BC and we have
> > clear
> > > > > >> > guidelines for that task.
> > > > > >>
> > > > > >> But why should I have to change package imports for annotations
> > just
> > > > > >> because they happen to be in LANG?
> > > > > >>
> > > > > >> Note that this could get confusing.
> > > > > >>
> > > > > >> Say XYZ component starts out only needing lang for the
> > annotations.
> > > > > >> So they include LANG 3.x and code the annotations.
> > > > > >>
> > > > > >> Later they find they want LANG 4.x for runtime.
> > > > > >> They would then need to drop the LANG 3.x dependency, fix up
all
> > the
> > > > > >> annotation imports etc.
> > > > > >> Unnecessary work if the annotations were in a separate
component.
> > > > > >>
> > > > > >> Also, any tool that wants to check the annotations will have to
> > look
> > > > > >> for them in lots of packages.
> > > > > >>
> > > > > >> Whilst it can no doubt be made to work, it's going to cause
> > problems
> > > > > later.
> > > > > >>
> > > > > >
> > > > > > To be on the playful side, this is what my mother calls
"borrowing
> > > > > trouble"
> > > > > > ;-)
> > > > > >
> > > > > > We can future-trip ourselves in all sorts of troubles. Our
> > > imaginations
> > > > > > know no bounds!  :-)
> > > > >
> > > > > This is not an imaginary scenario.
> > > > >
> > > > > We know that LANG will have a non-BC release at some point.
> > > > > The plan is to allow non-LANG components to share the LANG
> > annotations.
> > > > > We know that components which originally don't need LANG may end
up
> > > > > needing LANG at run-time.
> > > > > Therefore the problem will occur.
> > > > >
> > > > > In this case, "look before you leap" is appropriate.
> > > > >
> > > > > > Gary
> > > > > >
> > > > > >
> > > > > >>
> > > > > >> > Since already have a package called org.apache.commons.lang3.
> > > > > concurrent,
> > > > > >> I
> > > > > >> > propose we place these annottaions in
> > > > > >> > org.apache.commons.lang3.concurrent.annotation.
> > > > > >> >
> > > > > >> >
> > > > > >> >> >>
> > > > > >> >> >> My expectation for such annotations is that they would be
> > > > > >> >> >> self-contained (or built-in to the languange, not LANG).
> > > > > >> >> >>
> > > > > >> >> >
> > > > > >> >> > It is _because_ they are NOT built-in the language or JRE
> > that
> > > we
> > > > > are
> > > > > >> >> > proposing they belong in [lang].
> > > > > >> >> >
> > > > > >> >> > Since we are providing the annotation with CLASS retention
> > only
> > > > > >> >> > (initially), there is no hard dependency on [lang] at
> > runtime.
> > > > > >> >> >
> > > > > >> >> > Is there some subtlety we are missing?
> > > > > >> >>
> > > > > >> >> Yes, the compile-time dependency.
> > > > > >> >>
> > > > > >> >
> > > > > >> > No surprise, right? You can't use an annotation without
> > compiling
> > > > the
> > > > > >> > source file.
> > > > > >> >
> > > > > >> >
> > > > > >> >> AFAIK it's not possible to have a Maven compile-only
> > dependency;
> > > > > >> >> compile-time implies run-time.
> > > > > >> >>
> > > > > >> >
> > > > > >> > That's a tooling issue of course which should not invalidate
the
> > > > > >> worthiness
> > > > > >> > of this feature.
> > > > > >> >
> > > > > >> > If I am a downstream user of Commons Lang's new annotations,
I
> > > would
> > > > > >> need a
> > > > > >> > Maven scope that says "I need [lang] as a compile time only
> > > > > dependency" I
> > > > > >> > do not see such a scope on
> > > > > >> > https://maven.apache.org/guides/introduction/
> > > > > introduction-to-dependency-
> > > > > >> mechanism.html#Dependency_Scope
> > > > > >> >
> > > > > >> > Time for a Jira!
> > > > > >> >
> > > > > >> > I wonder what Gradle offers users in this dept.?
> > > > > >> >
> > > > > >> > Gary
> > > > > >> >
> > > > > >> >
> > > > > >> >>
> > > > > >> >> > Gary
> > > > > >> >> >
> > > > > >> >> >
> > > > > >> >> >> > Gary
> > > > > >> >> >> >
> > > > > >> >> >> > On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <
> > > > > >> britter@apache.org>
> > > > > >> >> >> wrote:
> > > > > >> >> >> >
> > > > > >> >> >> >> Hi,
> > > > > >> >> >> >>
> > > > > >> >> >> >> Gary Gregory <ga...@gmail.com> schrieb am So.,
> > 27.
> > > > Nov.
> > > > > >> 2016
> > > > > >> >> um
> > > > > >> >> >> >> 21:01 Uhr:
> > > > > >> >> >> >>
> > > > > >> >> >> >> > So let's start with the CLASS retention annotations
> > > first.
> > > > > I'll
> > > > > >> >> commit
> > > > > >> >> >> >> > later today.
> > > > > >> >> >> >> >
> > > > > >> >> >> >>
> > > > > >> >> >> >> Maybe create a GitHub PR so people can have a look
before
> > > it
> > > > > goes
> > > > > >> to
> > > > > >> >> >> >> master?
> > > > > >> >> >> >>
> > > > > >> >> >> >> Benedikt
> > > > > >> >> >> >>
> > > > > >> >> >> >>
> > > > > >> >> >> >> >
> > > > > >> >> >> >> > Gary
> > > > > >> >> >> >> >
> > > > > >> >> >> >> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <
> > boards@gmail.com
> > > >
> > > > > >> wrote:
> > > > > >> >> >> >> >
> > > > > >> >> >> >> > > I feel like documenting thread safety in such a
low
> > > > level,
> > > > > >> widely
> > > > > >> >> >> used
> > > > > >> >> >> >> > > library like [lang] is a great idea. Whether it
uses
> > > > > >> annotations,
> > > > > >> >> >> >> > javadocs,
> > > > > >> >> >> >> > > or some sort of informal javadoc comments isn't
too
> > > big a
> > > > > >> deal to
> > > > > >> >> >> me,
> > > > > >> >> >> >> but
> > > > > >> >> >> >> > > providing some guarantees of thread safety or lack
> > > > thereof
> > > > > >> would
> > > > > >> >> be
> > > > > >> >> >> >> > > invaluable information.
> > > > > >> >> >> >> > >
> > > > > >> >> >> >> > > On 27 November 2016 at 07:11, Benedikt Ritter <
> > > > > >> >> britter@apache.org>
> > > > > >> >> >> >> > wrote:
> > > > > >> >> >> >> > >
> > > > > >> >> >> >> > > > I thought we decided to abstain from documenting
> > > thread
> > > > > >> safety
> > > > > >> >> >> since
> > > > > >> >> >> >> it
> > > > > >> >> >> >> > > > would get outdated quickly anyway.
> > > > > >> >> >> >> > > >
> > > > > >> >> >> >> > > > Gary Gregory <ga...@gmail.com> schrieb am
> > > So.,
> > > > > 27.
> > > > > >> Nov.
> > > > > >> >> >> 2016
> > > > > >> >> >> >> um
> > > > > >> >> >> >> > > > 09:11 Uhr:
> > > > > >> >> >> >> > > >
> > > > > >> >> >> >> > > > > But if we then want a runtime version we had
an
> > odd
> > > > > >> packaging
> > > > > >> >> >> with
> > > > > >> >> >> >> > > CLASS
> > > > > >> >> >> >> > > > > retention in .concurrent. and RUNTIME in
> > > > > >> .concurrent.runtime.
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > > I might be in YAGNI territory here...
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > > Gary
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker
<
> > > > > >> >> boards@gmail.com
> > > > > >> >> >> >
> > > > > >> >> >> >> > > wrote:
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > > > I think adding the additional clazz/runtime
> > > package
> > > > > >> would
> > > > > >> >> be a
> > > > > >> >> >> >> > little
> > > > > >> >> >> >> > > > > > overkill if you only include one packaging
> > option
> > > > for
> > > > > >> now.
> > > > > >> >> >> >> > > > > >
> > > > > >> >> >> >> > > > > > On 27 November 2016 at 00:04, Gary Gregory <
> > > > > >> >> >> >> garydgregory@gmail.com
> > > > > >> >> >> >> > >
> > > > > >> >> >> >> > > > > wrote:
> > > > > >> >> >> >> > > > > >
> > > > > >> >> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <
> > > > > >> boards@gmail.com
> > > > > >> >> >
> > > > > >> >> >> >> wrote:
> > > > > >> >> >> >> > > > > > > >
> > > > > >> >> >> >> > > > > > > > I can think of a couple use cases for
> > runtime
> > > > > >> retention
> > > > > >> >> >> for
> > > > > >> >> >> >> > > thread
> > > > > >> >> >> >> > > > > > safety
> > > > > >> >> >> >> > > > > > > > annotations, but they're not specific to
> > > > commons
> > > > > >> lang.
> > > > > >> >> >> >> > > > > > > >
> > > > > >> >> >> >> > > > > > > > 1. A framework could choose what type of
> > data
> > > > > >> >> structure or
> > > > > >> >> >> >> > > > algorithm
> > > > > >> >> >> >> > > > > to
> > > > > >> >> >> >> > > > > > > use
> > > > > >> >> >> >> > > > > > > > at runtime based on the presence of
which
> > > > thread
> > > > > >> safety
> > > > > >> >> >> >> > > annotation
> > > > > >> >> >> >> > > > is
> > > > > >> >> >> >> > > > > > on.
> > > > > >> >> >> >> > > > > > > > Same for mutability.
> > > > > >> >> >> >> > > > > > > > 2. A testing framework could use these
> > > > > annotations
> > > > > >> to
> > > > > >> >> try
> > > > > >> >> >> and
> > > > > >> >> >> >> > > > > automate
> > > > > >> >> >> >> > > > > > > some
> > > > > >> >> >> >> > > > > > > > sort of thread safety tests, though that
> > > sounds
> > > > > >> like a
> > > > > >> >> >> hard
> > > > > >> >> >> >> > > problem
> > > > > >> >> >> >> > > > > to
> > > > > >> >> >> >> > > > > > > > actually implement.
> > > > > >> >> >> >> > > > > > > >
> > > > > >> >> >> >> > > > > > > > However, it'd be easier to just start
with
> > > > class
> > > > > >> >> retention
> > > > > >> >> >> >> (or
> > > > > >> >> >> >> > > > source
> > > > > >> >> >> >> > > > > > > > retention) just for documentation
purposes.
> > > > > Higher
> > > > > >> >> >> retention
> > > > > >> >> >> >> > > levels
> > > > > >> >> >> >> > > > > > could
> > > > > >> >> >> >> > > > > > > > be added later if an important use case
> > came
> > > > up.
> > > > > >> >> >> >> > > > > > >
> > > > > >> >> >> >> > > > > > > But which packaging option?
> > > > > >> >> >> >> > > > > > >
> > > > > >> >> >> >> > > > > > > Gary
> > > > > >> >> >> >> > > > > > > >
> > > > > >> >> >> >> > > > > > > > On 26 November 2016 at 19:56, Gary
Gregory
> > <
> > > > > >> >> >> >> > > garydgregory@gmail.com
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > > > > wrote:
> > > > > >> >> >> >> > > > > > > >
> > > > > >> >> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb
<
> > > > > >> >> sebbaz@gmail.com
> > > > > >> >> >> >
> > > > > >> >> >> >> > > wrote:
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary
> > > Gregory
> > > > <
> > > > > >> >> >> >> > > > > garydgregory@gmail.com
> > > > > >> >> >> >> > > > > > >
> > > > > >> >> >> >> > > > > > > > > wrote:
> > > > > >> >> >> >> > > > > > > > > > > On a [crypto] thread, I mentioned
> > > > > >> >> >> >> > > > http://pastebin.com/RKPGGdJ9
> > > > > >> >> >> >> > > > > > to
> > > > > >> >> >> >> > > > > > > add
> > > > > >> >> >> >> > > > > > > > > > the
> > > > > >> >> >> >> > > > > > > > > > > "classic" four
> > > > javax.annotation.concurrent
> > > > > >> >> >> annotations
> > > > > >> >> >> >> to
> > > > > >> >> >> >> > > two
> > > > > >> >> >> >> > > > > > > packages
> > > > > >> >> >> >> > > > > > > > > > > (.clazz and .runtime) in Commons
Lang
> > > for
> > > > > >> CLASS
> > > > > >> >> and
> > > > > >> >> >> >> > RUNTIME
> > > > > >> >> >> >> > > > > > > retentions.
> > > > > >> >> >> >> > > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > > You'd use the CLASS version to
avoid
> > a
> > > > hard
> > > > > >> >> >> dependency
> > > > > >> >> >> >> on
> > > > > >> >> >> >> > > > > [lang].
> > > > > >> >> >> >> > > > > > > > > RUNTIME
> > > > > >> >> >> >> > > > > > > > > > > to keep them around.
> > > > > >> >> >> >> > > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > > We'd use the CLASS versions in
all of
> > > > > Commons
> > > > > >> for
> > > > > >> >> >> >> > > documenting
> > > > > >> >> >> >> > > > > > > thread
> > > > > >> >> >> >> > > > > > > > > > safety.
> > > > > >> >> >> >> > > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > > Thoughts?
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > Definitely Class retention, not
> > Runtime.
> > > > > >> >> >> >> > > > > > > > > > You don't want to have to include
the
> > > > > annotation
> > > > > >> >> jar
> > > > > >> >> >> on
> > > > > >> >> >> >> the
> > > > > >> >> >> >> > > > > runtime
> > > > > >> >> >> >> > > > > > > > > > classpath.
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > Hi Sebb,
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > Right now I have both of these
packages:
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> > > > > >> >> annotation.concurrent.clazz
> > > > > >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> > > > > >> >> >> annotation.concurrent.runtime
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > Each with a copy of:
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > GuardedBy
> > > > > >> >> >> >> > > > > > > > > Immutable
> > > > > >> >> >> >> > > > > > > > > NotThreadSafe
> > > > > >> >> >> >> > > > > > > > > ThreadSafe
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > Should we include what I have as is?
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > If we were to only provide the
annotation
> > > at
> > > > > the
> > > > > >> >> CLASS
> > > > > >> >> >> >> > > retention
> > > > > >> >> >> >> > > > > > level,
> > > > > >> >> >> >> > > > > > > > > should we still package them in
> > > > > >> >> >> >> > ...annotation.concurrent.clazz
> > > > > >> >> >> >> > > in
> > > > > >> >> >> >> > > > > > case
> > > > > >> >> >> >> > > > > > > we
> > > > > >> >> >> >> > > > > > > > > want to provide
> > > annotation.concurrent.runtime
> > > > > >> later?
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > If we know for certain we never want
to
> > > > provide
> > > > > >> >> RUNTIME
> > > > > >> >> >> >> > > > retention,
> > > > > >> >> >> >> > > > > we
> > > > > >> >> >> >> > > > > > > can
> > > > > >> >> >> >> > > > > > > > > put them all in annotation.concurrent
> > now.
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > Thoughts?
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > Gary
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > [I don't know why the annotations
were
> > > ever
> > > > > >> >> considered
> > > > > >> >> >> >> > > suitable
> > > > > >> >> >> >> > > > > for
> > > > > >> >> >> >> > > > > > > > > > runtime]
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > > Gary
> > > > > >> >> >> >> > > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > > --
> > > > > >> >> >> >> > > > > > > > > > > E-Mail: garydgregory@gmail.com |
> > > > > >> >> >> ggregory@apache.org
> > > > > >> >> >> >> > > > > > > > > > > Java Persistence with Hibernate,
> > Second
> > > > > >> Edition
> > > > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > > > >> >> >> >> product/1617290459/ref=as_li_
> > > > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > >> >> >> >> 9325&creativeASIN=1617290459&
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > > > > > >
> > > > > >> >> >> >> > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2
> > > > > >> >> >> >> > > b8>
> > > > > >> >> >> >> > > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > > <http:////
> > > > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > > > >> >> >> a=
> > > > > >> >> >> >> > > > > > > > > > 1617290459>
> > > > > >> >> >> >> > > > > > > > > > > JUnit in Action, Second Edition
> > > > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > > > >> >> >> >> product/1935182021/ref=as_li_
> > > > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > >> >> >> >> 9325&creativeASIN=1935182021&
> > > > > >> >> >> >> > > > > > > > > > linkCode=as2&tag=garygregory-
> > 20&linkId=
> > > > > >> >> >> >> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > >> >> >> >> > > > > > > > > 18%22
> > > > > >> >> >> >> > > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > > <http:////
> > > > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > > > >> >> >> a=
> > > > > >> >> >> >> > > > > > > > > > 1935182021>
> > > > > >> >> >> >> > > > > > > > > > > Spring Batch in Action
> > > > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > > > >> >> >> >> product/1935182951/ref=as_li_
> > > > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > >> >> >> >> 9325&creativeASIN=1935182951&
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > linkCode=%7B%7BlinkCode%7D%7D&
> > > > tag=garygregory-20&linkId=%7B%
> > > > > >> >> >> >> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+
> > > > Batch+in+Action>
> > > > > >> >> >> >> > > > > > > > > > > <http:////
> > > > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > > > >> >> >> a=
> > > > > >> >> >> >> > > > > > > > > > 1935182951>
> > > > > >> >> >> >> > > > > > > > > > > Blog: http://garygregory.wordpress
.
> > com
> > > > > >> >> >> >> > > > > > > > > > > Home: http://garygregory.com/
> > > > > >> >> >> >> > > > > > > > > > > Tweet!
> > http://twitter.com/GaryGregory
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > ------------------------------
> > > > ------------------------------
> > > > > >> >> >> >> > > > > > > ---------
> > > > > >> >> >> >> > > > > > > > > > To unsubscribe, e-mail:
> > > > > dev-unsubscribe@commons.
> > > > > >> >> >> >> apache.org
> > > > > >> >> >> >> > > > > > > > > > For additional commands, e-mail:
> > > > > >> >> >> >> > dev-help@commons.apache.org
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > --
> > > > > >> >> >> >> > > > > > > > > E-Mail: garydgregory@gmail.com |
> > > > > >> ggregory@apache.org
> > > > > >> >> >> >> > > > > > > > > Java Persistence with Hibernate,
Second
> > > > Edition
> > > > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > > > >> >> >> product/1617290459/ref=as_li_
> > > > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > >> >> >> >> 9325&creativeASIN=1617290459&
> > > > > >> >> >> >> > > > > > > > >
linkCode=as2&tag=garygregory-20&linkId=
> > > > > >> >> >> >> > > > > > cadb800f39946ec62ea2b1af9fe6a2
> > > > > >> >> >> >> > > > > > > b8>
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> > > adsystem.com/e/ir?t=
> > > > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > > > >> >> >> >> > > > > > > > > 1617290459>
> > > > > >> >> >> >> > > > > > > > > JUnit in Action, Second Edition
> > > > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > > > >> >> >> product/1935182021/ref=as_li_
> > > > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > >> >> >> >> 9325&creativeASIN=1935182021&
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > >> >> >> >> > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > >> >> >> >> > > > > > 18%22
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> > > adsystem.com/e/ir?t=
> > > > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > > > >> >> >> >> > > > > > > > > 1935182021>
> > > > > >> >> >> >> > > > > > > > > Spring Batch in Action
> > > > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > > > >> >> >> product/1935182951/ref=as_li_
> > > > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > >> >> >> >> 9325&creativeASIN=1935182951&
> > > > > >> >> >> >> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
> > > > > >> >> >> >> tag=garygregory-20&linkId=%7B%
> > > > > >> >> >> >> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+
> > > Batch+in+Action>
> > > > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> > > adsystem.com/e/ir?t=
> > > > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > > > >> >> >> >> > > > > > > > > 1935182951>
> > > > > >> >> >> >> > > > > > > > > Blog: http://garygregory.wordpress.com
> > > > > >> >> >> >> > > > > > > > > Home: http://garygregory.com/
> > > > > >> >> >> >> > > > > > > > > Tweet! http://twitter.com/GaryGregory
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > >
> > > > > >> >> >> >> > > > > > > >
> > > > > >> >> >> >> > > > > > > >
> > > > > >> >> >> >> > > > > > > > --
> > > > > >> >> >> >> > > > > > > > Matt Sicker <bo...@gmail.com>
> > > > > >> >> >> >> > > > > > >
> > > > > >> >> >> >> > > > > >
> > > > > >> >> >> >> > > > > >
> > > > > >> >> >> >> > > > > >
> > > > > >> >> >> >> > > > > > --
> > > > > >> >> >> >> > > > > > Matt Sicker <bo...@gmail.com>
> > > > > >> >> >> >> > > > > >
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > > --
> > > > > >> >> >> >> > > > > E-Mail: garydgregory@gmail.com |
> > > ggregory@apache.org
> > > > > >> >> >> >> > > > > Java Persistence with Hibernate, Second
Edition
> > > > > >> >> >> >> > > > > <
> > > > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > > > product/1617290459/ref=as_li_
> > > > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > > > 9325&creativeASIN=1617290459&
> > > > > >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2b8
> > > > > >> >> >> >> > > > > >
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > > <http:////
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> > > ir?t=garygregory-20&l=am2&o=1&
> > > > > >> >> >> a=1617290459
> > > > > >> >> >> >> > > >
> > > > > >> >> >> >> > > > > JUnit in Action, Second Edition
> > > > > >> >> >> >> > > > > <
> > > > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > > > product/1935182021/ref=as_li_
> > > > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > > > 9325&creativeASIN=1935182021&
> > > > > >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > >> >> >> >> 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > >> >> >> >> > > 18%22
> > > > > >> >> >> >> > > > > >
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > > <http:////
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> > > ir?t=garygregory-20&l=am2&o=1&
> > > > > >> >> >> a=1935182021
> > > > > >> >> >> >> > > >
> > > > > >> >> >> >> > > > > Spring Batch in Action
> > > > > >> >> >> >> > > > > <
> > > > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > > > product/1935182951/ref=as_li_
> > > > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > > > 9325&creativeASIN=1935182951&
> > > > > >> >> >> >> > > > linkCode=%7B%7BlinkCode%7D%7D&
> > > > > >> tag=garygregory-20&linkId=%7B%
> > > > > >> >> >> >> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> > > > > >> >> >> >> > > > > >
> > > > > >> >> >> >> > > > > <http:////
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> > > ir?t=garygregory-20&l=am2&o=1&
> > > > > >> >> >> a=1935182951
> > > > > >> >> >> >> > > >
> > > > > >> >> >> >> > > > > Blog: http://garygregory.wordpress.com
> > > > > >> >> >> >> > > > > Home: http://garygregory.com/
> > > > > >> >> >> >> > > > > Tweet! http://twitter.com/GaryGregory
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > >
> > > > > >> >> >> >> > >
> > > > > >> >> >> >> > >
> > > > > >> >> >> >> > >
> > > > > >> >> >> >> > > --
> > > > > >> >> >> >> > > Matt Sicker <bo...@gmail.com>
> > > > > >> >> >> >> > >
> > > > > >> >> >> >> >
> > > > > >> >> >> >>
> > > > > >> >> >> >
> > > > > >> >> >> >
> > > > > >> >> >> >
> > > > > >> >> >> > --
> > > > > >> >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > >> >> >> > Java Persistence with Hibernate, Second Edition
> > > > > >> >> >> > <
https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > >> >> >>
tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > >> >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > > >> cadb800f39946ec62ea2b1af9fe6a2
> > > > > >> >> b8>
> > > > > >> >> >> >
> > > > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > >> >> garygregory-20&l=am2&o=1&a=
> > > > > >> >> >> 1617290459>
> > > > > >> >> >> > JUnit in Action, Second Edition
> > > > > >> >> >> > <
https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > >> >> >>
tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > >> >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > > >> 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > >> >> 18%22
> > > > > >> >> >> >
> > > > > >> >> >> >
> > > > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > >> >> garygregory-20&l=am2&o=1&a=
> > > > > >> >> >> 1935182021>
> > > > > >> >> >> > Spring Batch in Action
> > > > > >> >> >> > <
https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > >> >> >>
tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > >> >> >> linkCode=%7B%7BlinkCode%7D%7D&
> > tag=garygregory-20&linkId=%7B%
> > > > > >> >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > >> >> garygregory-20&l=am2&o=1&a=
> > > > > >> >> >> 1935182951>
> > > > > >> >> >> > Blog: http://garygregory.wordpress.com
> > > > > >> >> >> > Home: http://garygregory.com/
> > > > > >> >> >> > Tweet! http://twitter.com/GaryGregory
> > > > > >> >> >>
> > > > > >> >> >> ------------------------------
> > ------------------------------
> > > > > >> ---------
> > > > > >> >> >> To unsubscribe, e-mail:
dev-unsubscribe@commons.apache.org
> > > > > >> >> >> For additional commands, e-mail:
> > dev-help@commons.apache.org
> > > > > >> >> >>
> > > > > >> >> >>
> > > > > >> >> >
> > > > > >> >> >
> > > > > >> >> > --
> > > > > >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > >> >> > Java Persistence with Hibernate, Second Edition
> > > > > >> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > > cadb800f39946ec62ea2b1af9fe6a2
> > > > > >> b8>
> > > > > >> >> >
> > > > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > >> garygregory-20&l=am2&o=1&a=
> > > > > >> >> 1617290459>
> > > > > >> >> > JUnit in Action, Second Edition
> > > > > >> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > >> 18%22
> > > > > >> >> >
> > > > > >> >> >
> > > > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > >> garygregory-20&l=am2&o=1&a=
> > > > > >> >> 1935182021>
> > > > > >> >> > Spring Batch in Action
> > > > > >> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > >> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > >> garygregory-20&l=am2&o=1&a=
> > > > > >> >> 1935182951>
> > > > > >> >> > Blog: http://garygregory.wordpress.com
> > > > > >> >> > Home: http://garygregory.com/
> > > > > >> >> > Tweet! http://twitter.com/GaryGregory
> > > > > >> >>
> > > > > >> >> ------------------------------------------------------------
> > > > > ---------
> > > > > >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > > >> >> For additional commands, e-mail: dev-help@commons.apache.org
> > > > > >> >>
> > > > > >> >>
> > > > > >> >
> > > > > >> >
> > > > > >> > --
> > > > > >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > >> > Java Persistence with Hibernate, Second Edition
> > > > > >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > >> linkCode=as2&tag=garygregory-20&linkId=
> > > cadb800f39946ec62ea2b1af9fe6a2
> > > > > b8>
> > > > > >> >
> > > > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > garygregory-20&l=am2&o=1&a=
> > > > > >> 1617290459>
> > > > > >> > JUnit in Action, Second Edition
> > > > > >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > >> linkCode=as2&tag=garygregory-20&linkId=
> > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > 18%22
> > > > > >> >
> > > > > >> >
> > > > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > garygregory-20&l=am2&o=1&a=
> > > > > >> 1935182021>
> > > > > >> > Spring Batch in Action
> > > > > >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > garygregory-20&l=am2&o=1&a=
> > > > > >> 1935182951>
> > > > > >> > Blog: http://garygregory.wordpress.com
> > > > > >> > Home: http://garygregory.com/
> > > > > >> > Tweet! http://twitter.com/GaryGregory
> > > > > >>
> > > > > >> ------------------------------------------------------------
> > > ---------
> > > > > >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > > >> For additional commands, e-mail: dev-help@commons.apache.org
> > > > > >>
> > > > > >>
> > > > > >
> > > > > >
> > > > > > --
> > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > Java Persistence with Hibernate, Second Edition
> > > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > linkCode=as2&tag=garygregory-20&linkId=
> > cadb800f39946ec62ea2b1af9fe6a2
> > > b8>
> > > > > >
> > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > garygregory-20&l=am2&o=1&a=
> > > > > 1617290459>
> > > > > > JUnit in Action, Second Edition
> > > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > linkCode=as2&tag=garygregory-20&linkId=
> > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > 18%22
> > > > > >
> > > > > >
> > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > garygregory-20&l=am2&o=1&a=
> > > > > 1935182021>
> > > > > > Spring Batch in Action
> > > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > garygregory-20&l=am2&o=1&a=
> > > > > 1935182951>
> > > > > > Blog: http://garygregory.wordpress.com
> > > > > > Home: http://garygregory.com/
> > > > > > Tweet! http://twitter.com/GaryGregory
> > > > >
> > > > > ------------------------------------------------------------
> > ---------
> > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > > For additional commands, e-mail: dev-help@commons.apache.org
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Matt Sicker <bo...@gmail.com>
> > >
> >
>
>
>
> --
> Matt Sicker <bo...@gmail.com>

Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
Oh, and JSR 305 does not actually specify any concurrency annotations.

Gary

On Nov 27, 2016 6:46 PM, "Matt Sicker" <bo...@gmail.com> wrote:

> I'd be in favor of just including this as an internal annotation similar to
> how it's done in HttpClient.
>
> On 27 November 2016 at 20:44, Gary Gregory <ga...@gmail.com> wrote:
>
> > I do not think we should use an official Java package because the JSR 305
> > page says "The Executive Committee voted to list this JSR as dormant in
> May
> > 2012."
> >
> > Gary
> >
> > On Nov 27, 2016 6:39 PM, "Matt Sicker" <bo...@gmail.com> wrote:
> >
> > > If you're going to share the annotations between projects, why not use
> a
> > > JSR package for it like the google one? I thought the idea of embedding
> > the
> > > annotations in [lang] was to prevent the need for the dependency and to
> > use
> > > it internally, not as a public annotation for other projects to use.
> > >
> > > On 27 November 2016 at 19:55, Gary Gregory <ga...@gmail.com>
> > wrote:
> > >
> > > > Are you suggesting [lang] becomes a multi-module project?
> > > >
> > > > Gary
> > > >
> > > > On Nov 27, 2016 5:01 PM, "sebb" <se...@gmail.com> wrote:
> > > >
> > > > > On 28 November 2016 at 00:11, Gary Gregory <garydgregory@gmail.com
> >
> > > > wrote:
> > > > > > On Sun, Nov 27, 2016 at 4:09 PM, sebb <se...@gmail.com> wrote:
> > > > > >
> > > > > >> On 27 November 2016 at 23:51, Gary Gregory <
> > garydgregory@gmail.com>
> > > > > wrote:
> > > > > >> > On Sun, Nov 27, 2016 at 3:41 PM, sebb <se...@gmail.com>
> wrote:
> > > > > >> >
> > > > > >> >> On 27 November 2016 at 22:31, Gary Gregory <
> > > garydgregory@gmail.com
> > > > >
> > > > > >> wrote:
> > > > > >> >> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <se...@gmail.com>
> > > wrote:
> > > > > >> >> >
> > > > > >> >> >> On 27 November 2016 at 22:03, Gary Gregory <
> > > > > garydgregory@gmail.com>
> > > > > >> >> wrote:
> > > > > >> >> >> > These annotations are the SAME as have been published
> all
> > > over
> > > > > the
> > > > > >> >> place,
> > > > > >> >> >> > so I do not think we need a PR for review. Reviewing the
> > > code
> > > > in
> > > > > >> the
> > > > > >> >> repo
> > > > > >> >> >> > should be enough, but I'm not sure _what_ there is to
> > review
> > > > > >> really.
> > > > > >> >> I've
> > > > > >> >> >> > already posted a link to the sources (a pastebin link).
> > I'll
> > > > > >> create a
> > > > > >> >> >> Jira
> > > > > >> >> >> > of course.
> > > > > >> >> >>
> > > > > >> >> >> There is one aspect that needs review: does the annotation
> > > > belong
> > > > > in
> > > > > >> >> LANG?
> > > > > >> >> >> If we want to use the annotation in other components, do
> > they
> > > > > have to
> > > > > >> >> >> depend on LANG?
> > > > > >> >> >>
> > > > > >> >> >
> > > > > >> >> > No see below and previous messages.
> > > > > >> >> >
> > > > > >> >> >
> > > > > >> >> >> If not, do they all have their own copies?
> > > > > >> >> >>
> > > > > >> >> >
> > > > > >> >> > No.
> > > > > >> >> >
> > > > > >> >> >
> > > > > >> >> >>
> > > > > >> >> >> And what happens when LANG needs a non-BC release?
> > > > > >> >> >>
> > > > > >> >> >
> > > > > >> >> > What is the issue I am missing?
> > > > > >> >> >
> > > > > >> >>
> > > > > >> >> The package name for the annotation might need to change
> > > > > >> >> That would be a downstream nuisance.
> > > > > >> >>
> > > > > >> >
> > > > > >> > Hi All,
> > > > > >> >
> > > > > >> > How is that different than changing the package name for any
> of
> > > our
> > > > > other
> > > > > >> > lang types?
> > > > > >>
> > > > > >> It's not.
> > > > > >>
> > > > > >> > If you want move a package, you have to break BC and we have
> > clear
> > > > > >> > guidelines for that task.
> > > > > >>
> > > > > >> But why should I have to change package imports for annotations
> > just
> > > > > >> because they happen to be in LANG?
> > > > > >>
> > > > > >> Note that this could get confusing.
> > > > > >>
> > > > > >> Say XYZ component starts out only needing lang for the
> > annotations.
> > > > > >> So they include LANG 3.x and code the annotations.
> > > > > >>
> > > > > >> Later they find they want LANG 4.x for runtime.
> > > > > >> They would then need to drop the LANG 3.x dependency, fix up all
> > the
> > > > > >> annotation imports etc.
> > > > > >> Unnecessary work if the annotations were in a separate
> component.
> > > > > >>
> > > > > >> Also, any tool that wants to check the annotations will have to
> > look
> > > > > >> for them in lots of packages.
> > > > > >>
> > > > > >> Whilst it can no doubt be made to work, it's going to cause
> > problems
> > > > > later.
> > > > > >>
> > > > > >
> > > > > > To be on the playful side, this is what my mother calls
> "borrowing
> > > > > trouble"
> > > > > > ;-)
> > > > > >
> > > > > > We can future-trip ourselves in all sorts of troubles. Our
> > > imaginations
> > > > > > know no bounds!  :-)
> > > > >
> > > > > This is not an imaginary scenario.
> > > > >
> > > > > We know that LANG will have a non-BC release at some point.
> > > > > The plan is to allow non-LANG components to share the LANG
> > annotations.
> > > > > We know that components which originally don't need LANG may end up
> > > > > needing LANG at run-time.
> > > > > Therefore the problem will occur.
> > > > >
> > > > > In this case, "look before you leap" is appropriate.
> > > > >
> > > > > > Gary
> > > > > >
> > > > > >
> > > > > >>
> > > > > >> > Since already have a package called org.apache.commons.lang3.
> > > > > concurrent,
> > > > > >> I
> > > > > >> > propose we place these annottaions in
> > > > > >> > org.apache.commons.lang3.concurrent.annotation.
> > > > > >> >
> > > > > >> >
> > > > > >> >> >>
> > > > > >> >> >> My expectation for such annotations is that they would be
> > > > > >> >> >> self-contained (or built-in to the languange, not LANG).
> > > > > >> >> >>
> > > > > >> >> >
> > > > > >> >> > It is _because_ they are NOT built-in the language or JRE
> > that
> > > we
> > > > > are
> > > > > >> >> > proposing they belong in [lang].
> > > > > >> >> >
> > > > > >> >> > Since we are providing the annotation with CLASS retention
> > only
> > > > > >> >> > (initially), there is no hard dependency on [lang] at
> > runtime.
> > > > > >> >> >
> > > > > >> >> > Is there some subtlety we are missing?
> > > > > >> >>
> > > > > >> >> Yes, the compile-time dependency.
> > > > > >> >>
> > > > > >> >
> > > > > >> > No surprise, right? You can't use an annotation without
> > compiling
> > > > the
> > > > > >> > source file.
> > > > > >> >
> > > > > >> >
> > > > > >> >> AFAIK it's not possible to have a Maven compile-only
> > dependency;
> > > > > >> >> compile-time implies run-time.
> > > > > >> >>
> > > > > >> >
> > > > > >> > That's a tooling issue of course which should not invalidate
> the
> > > > > >> worthiness
> > > > > >> > of this feature.
> > > > > >> >
> > > > > >> > If I am a downstream user of Commons Lang's new annotations, I
> > > would
> > > > > >> need a
> > > > > >> > Maven scope that says "I need [lang] as a compile time only
> > > > > dependency" I
> > > > > >> > do not see such a scope on
> > > > > >> > https://maven.apache.org/guides/introduction/
> > > > > introduction-to-dependency-
> > > > > >> mechanism.html#Dependency_Scope
> > > > > >> >
> > > > > >> > Time for a Jira!
> > > > > >> >
> > > > > >> > I wonder what Gradle offers users in this dept.?
> > > > > >> >
> > > > > >> > Gary
> > > > > >> >
> > > > > >> >
> > > > > >> >>
> > > > > >> >> > Gary
> > > > > >> >> >
> > > > > >> >> >
> > > > > >> >> >> > Gary
> > > > > >> >> >> >
> > > > > >> >> >> > On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <
> > > > > >> britter@apache.org>
> > > > > >> >> >> wrote:
> > > > > >> >> >> >
> > > > > >> >> >> >> Hi,
> > > > > >> >> >> >>
> > > > > >> >> >> >> Gary Gregory <ga...@gmail.com> schrieb am So.,
> > 27.
> > > > Nov.
> > > > > >> 2016
> > > > > >> >> um
> > > > > >> >> >> >> 21:01 Uhr:
> > > > > >> >> >> >>
> > > > > >> >> >> >> > So let's start with the CLASS retention annotations
> > > first.
> > > > > I'll
> > > > > >> >> commit
> > > > > >> >> >> >> > later today.
> > > > > >> >> >> >> >
> > > > > >> >> >> >>
> > > > > >> >> >> >> Maybe create a GitHub PR so people can have a look
> before
> > > it
> > > > > goes
> > > > > >> to
> > > > > >> >> >> >> master?
> > > > > >> >> >> >>
> > > > > >> >> >> >> Benedikt
> > > > > >> >> >> >>
> > > > > >> >> >> >>
> > > > > >> >> >> >> >
> > > > > >> >> >> >> > Gary
> > > > > >> >> >> >> >
> > > > > >> >> >> >> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <
> > boards@gmail.com
> > > >
> > > > > >> wrote:
> > > > > >> >> >> >> >
> > > > > >> >> >> >> > > I feel like documenting thread safety in such a low
> > > > level,
> > > > > >> widely
> > > > > >> >> >> used
> > > > > >> >> >> >> > > library like [lang] is a great idea. Whether it
> uses
> > > > > >> annotations,
> > > > > >> >> >> >> > javadocs,
> > > > > >> >> >> >> > > or some sort of informal javadoc comments isn't too
> > > big a
> > > > > >> deal to
> > > > > >> >> >> me,
> > > > > >> >> >> >> but
> > > > > >> >> >> >> > > providing some guarantees of thread safety or lack
> > > > thereof
> > > > > >> would
> > > > > >> >> be
> > > > > >> >> >> >> > > invaluable information.
> > > > > >> >> >> >> > >
> > > > > >> >> >> >> > > On 27 November 2016 at 07:11, Benedikt Ritter <
> > > > > >> >> britter@apache.org>
> > > > > >> >> >> >> > wrote:
> > > > > >> >> >> >> > >
> > > > > >> >> >> >> > > > I thought we decided to abstain from documenting
> > > thread
> > > > > >> safety
> > > > > >> >> >> since
> > > > > >> >> >> >> it
> > > > > >> >> >> >> > > > would get outdated quickly anyway.
> > > > > >> >> >> >> > > >
> > > > > >> >> >> >> > > > Gary Gregory <ga...@gmail.com> schrieb am
> > > So.,
> > > > > 27.
> > > > > >> Nov.
> > > > > >> >> >> 2016
> > > > > >> >> >> >> um
> > > > > >> >> >> >> > > > 09:11 Uhr:
> > > > > >> >> >> >> > > >
> > > > > >> >> >> >> > > > > But if we then want a runtime version we had an
> > odd
> > > > > >> packaging
> > > > > >> >> >> with
> > > > > >> >> >> >> > > CLASS
> > > > > >> >> >> >> > > > > retention in .concurrent. and RUNTIME in
> > > > > >> .concurrent.runtime.
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > > I might be in YAGNI territory here...
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > > Gary
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <
> > > > > >> >> boards@gmail.com
> > > > > >> >> >> >
> > > > > >> >> >> >> > > wrote:
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > > > I think adding the additional clazz/runtime
> > > package
> > > > > >> would
> > > > > >> >> be a
> > > > > >> >> >> >> > little
> > > > > >> >> >> >> > > > > > overkill if you only include one packaging
> > option
> > > > for
> > > > > >> now.
> > > > > >> >> >> >> > > > > >
> > > > > >> >> >> >> > > > > > On 27 November 2016 at 00:04, Gary Gregory <
> > > > > >> >> >> >> garydgregory@gmail.com
> > > > > >> >> >> >> > >
> > > > > >> >> >> >> > > > > wrote:
> > > > > >> >> >> >> > > > > >
> > > > > >> >> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <
> > > > > >> boards@gmail.com
> > > > > >> >> >
> > > > > >> >> >> >> wrote:
> > > > > >> >> >> >> > > > > > > >
> > > > > >> >> >> >> > > > > > > > I can think of a couple use cases for
> > runtime
> > > > > >> retention
> > > > > >> >> >> for
> > > > > >> >> >> >> > > thread
> > > > > >> >> >> >> > > > > > safety
> > > > > >> >> >> >> > > > > > > > annotations, but they're not specific to
> > > > commons
> > > > > >> lang.
> > > > > >> >> >> >> > > > > > > >
> > > > > >> >> >> >> > > > > > > > 1. A framework could choose what type of
> > data
> > > > > >> >> structure or
> > > > > >> >> >> >> > > > algorithm
> > > > > >> >> >> >> > > > > to
> > > > > >> >> >> >> > > > > > > use
> > > > > >> >> >> >> > > > > > > > at runtime based on the presence of which
> > > > thread
> > > > > >> safety
> > > > > >> >> >> >> > > annotation
> > > > > >> >> >> >> > > > is
> > > > > >> >> >> >> > > > > > on.
> > > > > >> >> >> >> > > > > > > > Same for mutability.
> > > > > >> >> >> >> > > > > > > > 2. A testing framework could use these
> > > > > annotations
> > > > > >> to
> > > > > >> >> try
> > > > > >> >> >> and
> > > > > >> >> >> >> > > > > automate
> > > > > >> >> >> >> > > > > > > some
> > > > > >> >> >> >> > > > > > > > sort of thread safety tests, though that
> > > sounds
> > > > > >> like a
> > > > > >> >> >> hard
> > > > > >> >> >> >> > > problem
> > > > > >> >> >> >> > > > > to
> > > > > >> >> >> >> > > > > > > > actually implement.
> > > > > >> >> >> >> > > > > > > >
> > > > > >> >> >> >> > > > > > > > However, it'd be easier to just start
> with
> > > > class
> > > > > >> >> retention
> > > > > >> >> >> >> (or
> > > > > >> >> >> >> > > > source
> > > > > >> >> >> >> > > > > > > > retention) just for documentation
> purposes.
> > > > > Higher
> > > > > >> >> >> retention
> > > > > >> >> >> >> > > levels
> > > > > >> >> >> >> > > > > > could
> > > > > >> >> >> >> > > > > > > > be added later if an important use case
> > came
> > > > up.
> > > > > >> >> >> >> > > > > > >
> > > > > >> >> >> >> > > > > > > But which packaging option?
> > > > > >> >> >> >> > > > > > >
> > > > > >> >> >> >> > > > > > > Gary
> > > > > >> >> >> >> > > > > > > >
> > > > > >> >> >> >> > > > > > > > On 26 November 2016 at 19:56, Gary
> Gregory
> > <
> > > > > >> >> >> >> > > garydgregory@gmail.com
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > > > > wrote:
> > > > > >> >> >> >> > > > > > > >
> > > > > >> >> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <
> > > > > >> >> sebbaz@gmail.com
> > > > > >> >> >> >
> > > > > >> >> >> >> > > wrote:
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary
> > > Gregory
> > > > <
> > > > > >> >> >> >> > > > > garydgregory@gmail.com
> > > > > >> >> >> >> > > > > > >
> > > > > >> >> >> >> > > > > > > > > wrote:
> > > > > >> >> >> >> > > > > > > > > > > On a [crypto] thread, I mentioned
> > > > > >> >> >> >> > > > http://pastebin.com/RKPGGdJ9
> > > > > >> >> >> >> > > > > > to
> > > > > >> >> >> >> > > > > > > add
> > > > > >> >> >> >> > > > > > > > > > the
> > > > > >> >> >> >> > > > > > > > > > > "classic" four
> > > > javax.annotation.concurrent
> > > > > >> >> >> annotations
> > > > > >> >> >> >> to
> > > > > >> >> >> >> > > two
> > > > > >> >> >> >> > > > > > > packages
> > > > > >> >> >> >> > > > > > > > > > > (.clazz and .runtime) in Commons
> Lang
> > > for
> > > > > >> CLASS
> > > > > >> >> and
> > > > > >> >> >> >> > RUNTIME
> > > > > >> >> >> >> > > > > > > retentions.
> > > > > >> >> >> >> > > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > > You'd use the CLASS version to
> avoid
> > a
> > > > hard
> > > > > >> >> >> dependency
> > > > > >> >> >> >> on
> > > > > >> >> >> >> > > > > [lang].
> > > > > >> >> >> >> > > > > > > > > RUNTIME
> > > > > >> >> >> >> > > > > > > > > > > to keep them around.
> > > > > >> >> >> >> > > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > > We'd use the CLASS versions in all
> of
> > > > > Commons
> > > > > >> for
> > > > > >> >> >> >> > > documenting
> > > > > >> >> >> >> > > > > > > thread
> > > > > >> >> >> >> > > > > > > > > > safety.
> > > > > >> >> >> >> > > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > > Thoughts?
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > Definitely Class retention, not
> > Runtime.
> > > > > >> >> >> >> > > > > > > > > > You don't want to have to include the
> > > > > annotation
> > > > > >> >> jar
> > > > > >> >> >> on
> > > > > >> >> >> >> the
> > > > > >> >> >> >> > > > > runtime
> > > > > >> >> >> >> > > > > > > > > > classpath.
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > Hi Sebb,
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > Right now I have both of these
> packages:
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> > > > > >> >> annotation.concurrent.clazz
> > > > > >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> > > > > >> >> >> annotation.concurrent.runtime
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > Each with a copy of:
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > GuardedBy
> > > > > >> >> >> >> > > > > > > > > Immutable
> > > > > >> >> >> >> > > > > > > > > NotThreadSafe
> > > > > >> >> >> >> > > > > > > > > ThreadSafe
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > Should we include what I have as is?
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > If we were to only provide the
> annotation
> > > at
> > > > > the
> > > > > >> >> CLASS
> > > > > >> >> >> >> > > retention
> > > > > >> >> >> >> > > > > > level,
> > > > > >> >> >> >> > > > > > > > > should we still package them in
> > > > > >> >> >> >> > ...annotation.concurrent.clazz
> > > > > >> >> >> >> > > in
> > > > > >> >> >> >> > > > > > case
> > > > > >> >> >> >> > > > > > > we
> > > > > >> >> >> >> > > > > > > > > want to provide
> > > annotation.concurrent.runtime
> > > > > >> later?
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > If we know for certain we never want to
> > > > provide
> > > > > >> >> RUNTIME
> > > > > >> >> >> >> > > > retention,
> > > > > >> >> >> >> > > > > we
> > > > > >> >> >> >> > > > > > > can
> > > > > >> >> >> >> > > > > > > > > put them all in annotation.concurrent
> > now.
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > Thoughts?
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > Gary
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > [I don't know why the annotations
> were
> > > ever
> > > > > >> >> considered
> > > > > >> >> >> >> > > suitable
> > > > > >> >> >> >> > > > > for
> > > > > >> >> >> >> > > > > > > > > > runtime]
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > > Gary
> > > > > >> >> >> >> > > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > > --
> > > > > >> >> >> >> > > > > > > > > > > E-Mail: garydgregory@gmail.com |
> > > > > >> >> >> ggregory@apache.org
> > > > > >> >> >> >> > > > > > > > > > > Java Persistence with Hibernate,
> > Second
> > > > > >> Edition
> > > > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > > > >> >> >> >> product/1617290459/ref=as_li_
> > > > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > >> >> >> >> 9325&creativeASIN=1617290459&
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > > > > > >
> > > > > >> >> >> >> > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2
> > > > > >> >> >> >> > > b8>
> > > > > >> >> >> >> > > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > > <http:////
> > > > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > > > >> >> >> a=
> > > > > >> >> >> >> > > > > > > > > > 1617290459>
> > > > > >> >> >> >> > > > > > > > > > > JUnit in Action, Second Edition
> > > > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > > > >> >> >> >> product/1935182021/ref=as_li_
> > > > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > >> >> >> >> 9325&creativeASIN=1935182021&
> > > > > >> >> >> >> > > > > > > > > > linkCode=as2&tag=garygregory-
> > 20&linkId=
> > > > > >> >> >> >> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > >> >> >> >> > > > > > > > > 18%22
> > > > > >> >> >> >> > > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > > > <http:////
> > > > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > > > >> >> >> a=
> > > > > >> >> >> >> > > > > > > > > > 1935182021>
> > > > > >> >> >> >> > > > > > > > > > > Spring Batch in Action
> > > > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > > > >> >> >> >> product/1935182951/ref=as_li_
> > > > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > >> >> >> >> 9325&creativeASIN=1935182951&
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > linkCode=%7B%7BlinkCode%7D%7D&
> > > > tag=garygregory-20&linkId=%7B%
> > > > > >> >> >> >> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+
> > > > Batch+in+Action>
> > > > > >> >> >> >> > > > > > > > > > > <http:////
> > > > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > > > >> >> >> a=
> > > > > >> >> >> >> > > > > > > > > > 1935182951>
> > > > > >> >> >> >> > > > > > > > > > > Blog: http://garygregory.wordpress
> .
> > com
> > > > > >> >> >> >> > > > > > > > > > > Home: http://garygregory.com/
> > > > > >> >> >> >> > > > > > > > > > > Tweet!
> > http://twitter.com/GaryGregory
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > ------------------------------
> > > > ------------------------------
> > > > > >> >> >> >> > > > > > > ---------
> > > > > >> >> >> >> > > > > > > > > > To unsubscribe, e-mail:
> > > > > dev-unsubscribe@commons.
> > > > > >> >> >> >> apache.org
> > > > > >> >> >> >> > > > > > > > > > For additional commands, e-mail:
> > > > > >> >> >> >> > dev-help@commons.apache.org
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > --
> > > > > >> >> >> >> > > > > > > > > E-Mail: garydgregory@gmail.com |
> > > > > >> ggregory@apache.org
> > > > > >> >> >> >> > > > > > > > > Java Persistence with Hibernate, Second
> > > > Edition
> > > > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > > > >> >> >> product/1617290459/ref=as_li_
> > > > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > >> >> >> >> 9325&creativeASIN=1617290459&
> > > > > >> >> >> >> > > > > > > > > linkCode=as2&tag=garygregory-
> 20&linkId=
> > > > > >> >> >> >> > > > > > cadb800f39946ec62ea2b1af9fe6a2
> > > > > >> >> >> >> > > > > > > b8>
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> > > adsystem.com/e/ir?t=
> > > > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > > > >> >> >> >> > > > > > > > > 1617290459>
> > > > > >> >> >> >> > > > > > > > > JUnit in Action, Second Edition
> > > > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > > > >> >> >> product/1935182021/ref=as_li_
> > > > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > >> >> >> >> 9325&creativeASIN=1935182021&
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > >> >> >> >> > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > >> >> >> >> > > > > > 18%22
> > > > > >> >> >> >> > > > > > > > > >
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> > > adsystem.com/e/ir?t=
> > > > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > > > >> >> >> >> > > > > > > > > 1935182021>
> > > > > >> >> >> >> > > > > > > > > Spring Batch in Action
> > > > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > > > >> >> >> product/1935182951/ref=as_li_
> > > > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > > >> >> >> >> 9325&creativeASIN=1935182951&
> > > > > >> >> >> >> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
> > > > > >> >> >> >> tag=garygregory-20&linkId=%7B%
> > > > > >> >> >> >> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+
> > > Batch+in+Action>
> > > > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> > > adsystem.com/e/ir?t=
> > > > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > > > >> >> >> >> > > > > > > > > 1935182951>
> > > > > >> >> >> >> > > > > > > > > Blog: http://garygregory.wordpress.com
> > > > > >> >> >> >> > > > > > > > > Home: http://garygregory.com/
> > > > > >> >> >> >> > > > > > > > > Tweet! http://twitter.com/GaryGregory
> > > > > >> >> >> >> > > > > > > > >
> > > > > >> >> >> >> > > > > > > >
> > > > > >> >> >> >> > > > > > > >
> > > > > >> >> >> >> > > > > > > >
> > > > > >> >> >> >> > > > > > > > --
> > > > > >> >> >> >> > > > > > > > Matt Sicker <bo...@gmail.com>
> > > > > >> >> >> >> > > > > > >
> > > > > >> >> >> >> > > > > >
> > > > > >> >> >> >> > > > > >
> > > > > >> >> >> >> > > > > >
> > > > > >> >> >> >> > > > > > --
> > > > > >> >> >> >> > > > > > Matt Sicker <bo...@gmail.com>
> > > > > >> >> >> >> > > > > >
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > > --
> > > > > >> >> >> >> > > > > E-Mail: garydgregory@gmail.com |
> > > ggregory@apache.org
> > > > > >> >> >> >> > > > > Java Persistence with Hibernate, Second Edition
> > > > > >> >> >> >> > > > > <
> > > > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > > > product/1617290459/ref=as_li_
> > > > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > > > 9325&creativeASIN=1617290459&
> > > > > >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2b8
> > > > > >> >> >> >> > > > > >
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > > <http:////
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> > > ir?t=garygregory-20&l=am2&o=1&
> > > > > >> >> >> a=1617290459
> > > > > >> >> >> >> > > >
> > > > > >> >> >> >> > > > > JUnit in Action, Second Edition
> > > > > >> >> >> >> > > > > <
> > > > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > > > product/1935182021/ref=as_li_
> > > > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > > > 9325&creativeASIN=1935182021&
> > > > > >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > >> >> >> >> 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > >> >> >> >> > > 18%22
> > > > > >> >> >> >> > > > > >
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > > > <http:////
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> > > ir?t=garygregory-20&l=am2&o=1&
> > > > > >> >> >> a=1935182021
> > > > > >> >> >> >> > > >
> > > > > >> >> >> >> > > > > Spring Batch in Action
> > > > > >> >> >> >> > > > > <
> > > > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > > > product/1935182951/ref=as_li_
> > > > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > > > 9325&creativeASIN=1935182951&
> > > > > >> >> >> >> > > > linkCode=%7B%7BlinkCode%7D%7D&
> > > > > >> tag=garygregory-20&linkId=%7B%
> > > > > >> >> >> >> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> > > > > >> >> >> >> > > > > >
> > > > > >> >> >> >> > > > > <http:////
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> > > ir?t=garygregory-20&l=am2&o=1&
> > > > > >> >> >> a=1935182951
> > > > > >> >> >> >> > > >
> > > > > >> >> >> >> > > > > Blog: http://garygregory.wordpress.com
> > > > > >> >> >> >> > > > > Home: http://garygregory.com/
> > > > > >> >> >> >> > > > > Tweet! http://twitter.com/GaryGregory
> > > > > >> >> >> >> > > > >
> > > > > >> >> >> >> > > >
> > > > > >> >> >> >> > >
> > > > > >> >> >> >> > >
> > > > > >> >> >> >> > >
> > > > > >> >> >> >> > > --
> > > > > >> >> >> >> > > Matt Sicker <bo...@gmail.com>
> > > > > >> >> >> >> > >
> > > > > >> >> >> >> >
> > > > > >> >> >> >>
> > > > > >> >> >> >
> > > > > >> >> >> >
> > > > > >> >> >> >
> > > > > >> >> >> > --
> > > > > >> >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > >> >> >> > Java Persistence with Hibernate, Second Edition
> > > > > >> >> >> > <https://www.amazon.com/gp/
> product/1617290459/ref=as_li_
> > > > > >> >> >> tl?ie=UTF8&camp=1789&creative=
> 9325&creativeASIN=1617290459&
> > > > > >> >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > > >> cadb800f39946ec62ea2b1af9fe6a2
> > > > > >> >> b8>
> > > > > >> >> >> >
> > > > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > >> >> garygregory-20&l=am2&o=1&a=
> > > > > >> >> >> 1617290459>
> > > > > >> >> >> > JUnit in Action, Second Edition
> > > > > >> >> >> > <https://www.amazon.com/gp/
> product/1935182021/ref=as_li_
> > > > > >> >> >> tl?ie=UTF8&camp=1789&creative=
> 9325&creativeASIN=1935182021&
> > > > > >> >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > > >> 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > >> >> 18%22
> > > > > >> >> >> >
> > > > > >> >> >> >
> > > > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > >> >> garygregory-20&l=am2&o=1&a=
> > > > > >> >> >> 1935182021>
> > > > > >> >> >> > Spring Batch in Action
> > > > > >> >> >> > <https://www.amazon.com/gp/
> product/1935182951/ref=as_li_
> > > > > >> >> >> tl?ie=UTF8&camp=1789&creative=
> 9325&creativeASIN=1935182951&
> > > > > >> >> >> linkCode=%7B%7BlinkCode%7D%7D&
> > tag=garygregory-20&linkId=%7B%
> > > > > >> >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > >> >> garygregory-20&l=am2&o=1&a=
> > > > > >> >> >> 1935182951>
> > > > > >> >> >> > Blog: http://garygregory.wordpress.com
> > > > > >> >> >> > Home: http://garygregory.com/
> > > > > >> >> >> > Tweet! http://twitter.com/GaryGregory
> > > > > >> >> >>
> > > > > >> >> >> ------------------------------
> > ------------------------------
> > > > > >> ---------
> > > > > >> >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.
> apache.org
> > > > > >> >> >> For additional commands, e-mail:
> > dev-help@commons.apache.org
> > > > > >> >> >>
> > > > > >> >> >>
> > > > > >> >> >
> > > > > >> >> >
> > > > > >> >> > --
> > > > > >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > >> >> > Java Persistence with Hibernate, Second Edition
> > > > > >> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > > cadb800f39946ec62ea2b1af9fe6a2
> > > > > >> b8>
> > > > > >> >> >
> > > > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > >> garygregory-20&l=am2&o=1&a=
> > > > > >> >> 1617290459>
> > > > > >> >> > JUnit in Action, Second Edition
> > > > > >> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > >> 18%22
> > > > > >> >> >
> > > > > >> >> >
> > > > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > >> garygregory-20&l=am2&o=1&a=
> > > > > >> >> 1935182021>
> > > > > >> >> > Spring Batch in Action
> > > > > >> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > >> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > >> garygregory-20&l=am2&o=1&a=
> > > > > >> >> 1935182951>
> > > > > >> >> > Blog: http://garygregory.wordpress.com
> > > > > >> >> > Home: http://garygregory.com/
> > > > > >> >> > Tweet! http://twitter.com/GaryGregory
> > > > > >> >>
> > > > > >> >> ------------------------------------------------------------
> > > > > ---------
> > > > > >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > > >> >> For additional commands, e-mail: dev-help@commons.apache.org
> > > > > >> >>
> > > > > >> >>
> > > > > >> >
> > > > > >> >
> > > > > >> > --
> > > > > >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > >> > Java Persistence with Hibernate, Second Edition
> > > > > >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > >> linkCode=as2&tag=garygregory-20&linkId=
> > > cadb800f39946ec62ea2b1af9fe6a2
> > > > > b8>
> > > > > >> >
> > > > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > garygregory-20&l=am2&o=1&a=
> > > > > >> 1617290459>
> > > > > >> > JUnit in Action, Second Edition
> > > > > >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > >> linkCode=as2&tag=garygregory-20&linkId=
> > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > 18%22
> > > > > >> >
> > > > > >> >
> > > > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > garygregory-20&l=am2&o=1&a=
> > > > > >> 1935182021>
> > > > > >> > Spring Batch in Action
> > > > > >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > garygregory-20&l=am2&o=1&a=
> > > > > >> 1935182951>
> > > > > >> > Blog: http://garygregory.wordpress.com
> > > > > >> > Home: http://garygregory.com/
> > > > > >> > Tweet! http://twitter.com/GaryGregory
> > > > > >>
> > > > > >> ------------------------------------------------------------
> > > ---------
> > > > > >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > > >> For additional commands, e-mail: dev-help@commons.apache.org
> > > > > >>
> > > > > >>
> > > > > >
> > > > > >
> > > > > > --
> > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > Java Persistence with Hibernate, Second Edition
> > > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > linkCode=as2&tag=garygregory-20&linkId=
> > cadb800f39946ec62ea2b1af9fe6a2
> > > b8>
> > > > > >
> > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > garygregory-20&l=am2&o=1&a=
> > > > > 1617290459>
> > > > > > JUnit in Action, Second Edition
> > > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > linkCode=as2&tag=garygregory-20&linkId=
> > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > 18%22
> > > > > >
> > > > > >
> > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > garygregory-20&l=am2&o=1&a=
> > > > > 1935182021>
> > > > > > Spring Batch in Action
> > > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > garygregory-20&l=am2&o=1&a=
> > > > > 1935182951>
> > > > > > Blog: http://garygregory.wordpress.com
> > > > > > Home: http://garygregory.com/
> > > > > > Tweet! http://twitter.com/GaryGregory
> > > > >
> > > > > ------------------------------------------------------------
> > ---------
> > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > > For additional commands, e-mail: dev-help@commons.apache.org
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Matt Sicker <bo...@gmail.com>
> > >
> >
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>

Re: [lang] Thread safety annotations

Posted by Matt Sicker <bo...@gmail.com>.
I'd be in favor of just including this as an internal annotation similar to
how it's done in HttpClient.

On 27 November 2016 at 20:44, Gary Gregory <ga...@gmail.com> wrote:

> I do not think we should use an official Java package because the JSR 305
> page says "The Executive Committee voted to list this JSR as dormant in May
> 2012."
>
> Gary
>
> On Nov 27, 2016 6:39 PM, "Matt Sicker" <bo...@gmail.com> wrote:
>
> > If you're going to share the annotations between projects, why not use a
> > JSR package for it like the google one? I thought the idea of embedding
> the
> > annotations in [lang] was to prevent the need for the dependency and to
> use
> > it internally, not as a public annotation for other projects to use.
> >
> > On 27 November 2016 at 19:55, Gary Gregory <ga...@gmail.com>
> wrote:
> >
> > > Are you suggesting [lang] becomes a multi-module project?
> > >
> > > Gary
> > >
> > > On Nov 27, 2016 5:01 PM, "sebb" <se...@gmail.com> wrote:
> > >
> > > > On 28 November 2016 at 00:11, Gary Gregory <ga...@gmail.com>
> > > wrote:
> > > > > On Sun, Nov 27, 2016 at 4:09 PM, sebb <se...@gmail.com> wrote:
> > > > >
> > > > >> On 27 November 2016 at 23:51, Gary Gregory <
> garydgregory@gmail.com>
> > > > wrote:
> > > > >> > On Sun, Nov 27, 2016 at 3:41 PM, sebb <se...@gmail.com> wrote:
> > > > >> >
> > > > >> >> On 27 November 2016 at 22:31, Gary Gregory <
> > garydgregory@gmail.com
> > > >
> > > > >> wrote:
> > > > >> >> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <se...@gmail.com>
> > wrote:
> > > > >> >> >
> > > > >> >> >> On 27 November 2016 at 22:03, Gary Gregory <
> > > > garydgregory@gmail.com>
> > > > >> >> wrote:
> > > > >> >> >> > These annotations are the SAME as have been published all
> > over
> > > > the
> > > > >> >> place,
> > > > >> >> >> > so I do not think we need a PR for review. Reviewing the
> > code
> > > in
> > > > >> the
> > > > >> >> repo
> > > > >> >> >> > should be enough, but I'm not sure _what_ there is to
> review
> > > > >> really.
> > > > >> >> I've
> > > > >> >> >> > already posted a link to the sources (a pastebin link).
> I'll
> > > > >> create a
> > > > >> >> >> Jira
> > > > >> >> >> > of course.
> > > > >> >> >>
> > > > >> >> >> There is one aspect that needs review: does the annotation
> > > belong
> > > > in
> > > > >> >> LANG?
> > > > >> >> >> If we want to use the annotation in other components, do
> they
> > > > have to
> > > > >> >> >> depend on LANG?
> > > > >> >> >>
> > > > >> >> >
> > > > >> >> > No see below and previous messages.
> > > > >> >> >
> > > > >> >> >
> > > > >> >> >> If not, do they all have their own copies?
> > > > >> >> >>
> > > > >> >> >
> > > > >> >> > No.
> > > > >> >> >
> > > > >> >> >
> > > > >> >> >>
> > > > >> >> >> And what happens when LANG needs a non-BC release?
> > > > >> >> >>
> > > > >> >> >
> > > > >> >> > What is the issue I am missing?
> > > > >> >> >
> > > > >> >>
> > > > >> >> The package name for the annotation might need to change
> > > > >> >> That would be a downstream nuisance.
> > > > >> >>
> > > > >> >
> > > > >> > Hi All,
> > > > >> >
> > > > >> > How is that different than changing the package name for any of
> > our
> > > > other
> > > > >> > lang types?
> > > > >>
> > > > >> It's not.
> > > > >>
> > > > >> > If you want move a package, you have to break BC and we have
> clear
> > > > >> > guidelines for that task.
> > > > >>
> > > > >> But why should I have to change package imports for annotations
> just
> > > > >> because they happen to be in LANG?
> > > > >>
> > > > >> Note that this could get confusing.
> > > > >>
> > > > >> Say XYZ component starts out only needing lang for the
> annotations.
> > > > >> So they include LANG 3.x and code the annotations.
> > > > >>
> > > > >> Later they find they want LANG 4.x for runtime.
> > > > >> They would then need to drop the LANG 3.x dependency, fix up all
> the
> > > > >> annotation imports etc.
> > > > >> Unnecessary work if the annotations were in a separate component.
> > > > >>
> > > > >> Also, any tool that wants to check the annotations will have to
> look
> > > > >> for them in lots of packages.
> > > > >>
> > > > >> Whilst it can no doubt be made to work, it's going to cause
> problems
> > > > later.
> > > > >>
> > > > >
> > > > > To be on the playful side, this is what my mother calls "borrowing
> > > > trouble"
> > > > > ;-)
> > > > >
> > > > > We can future-trip ourselves in all sorts of troubles. Our
> > imaginations
> > > > > know no bounds!  :-)
> > > >
> > > > This is not an imaginary scenario.
> > > >
> > > > We know that LANG will have a non-BC release at some point.
> > > > The plan is to allow non-LANG components to share the LANG
> annotations.
> > > > We know that components which originally don't need LANG may end up
> > > > needing LANG at run-time.
> > > > Therefore the problem will occur.
> > > >
> > > > In this case, "look before you leap" is appropriate.
> > > >
> > > > > Gary
> > > > >
> > > > >
> > > > >>
> > > > >> > Since already have a package called org.apache.commons.lang3.
> > > > concurrent,
> > > > >> I
> > > > >> > propose we place these annottaions in
> > > > >> > org.apache.commons.lang3.concurrent.annotation.
> > > > >> >
> > > > >> >
> > > > >> >> >>
> > > > >> >> >> My expectation for such annotations is that they would be
> > > > >> >> >> self-contained (or built-in to the languange, not LANG).
> > > > >> >> >>
> > > > >> >> >
> > > > >> >> > It is _because_ they are NOT built-in the language or JRE
> that
> > we
> > > > are
> > > > >> >> > proposing they belong in [lang].
> > > > >> >> >
> > > > >> >> > Since we are providing the annotation with CLASS retention
> only
> > > > >> >> > (initially), there is no hard dependency on [lang] at
> runtime.
> > > > >> >> >
> > > > >> >> > Is there some subtlety we are missing?
> > > > >> >>
> > > > >> >> Yes, the compile-time dependency.
> > > > >> >>
> > > > >> >
> > > > >> > No surprise, right? You can't use an annotation without
> compiling
> > > the
> > > > >> > source file.
> > > > >> >
> > > > >> >
> > > > >> >> AFAIK it's not possible to have a Maven compile-only
> dependency;
> > > > >> >> compile-time implies run-time.
> > > > >> >>
> > > > >> >
> > > > >> > That's a tooling issue of course which should not invalidate the
> > > > >> worthiness
> > > > >> > of this feature.
> > > > >> >
> > > > >> > If I am a downstream user of Commons Lang's new annotations, I
> > would
> > > > >> need a
> > > > >> > Maven scope that says "I need [lang] as a compile time only
> > > > dependency" I
> > > > >> > do not see such a scope on
> > > > >> > https://maven.apache.org/guides/introduction/
> > > > introduction-to-dependency-
> > > > >> mechanism.html#Dependency_Scope
> > > > >> >
> > > > >> > Time for a Jira!
> > > > >> >
> > > > >> > I wonder what Gradle offers users in this dept.?
> > > > >> >
> > > > >> > Gary
> > > > >> >
> > > > >> >
> > > > >> >>
> > > > >> >> > Gary
> > > > >> >> >
> > > > >> >> >
> > > > >> >> >> > Gary
> > > > >> >> >> >
> > > > >> >> >> > On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <
> > > > >> britter@apache.org>
> > > > >> >> >> wrote:
> > > > >> >> >> >
> > > > >> >> >> >> Hi,
> > > > >> >> >> >>
> > > > >> >> >> >> Gary Gregory <ga...@gmail.com> schrieb am So.,
> 27.
> > > Nov.
> > > > >> 2016
> > > > >> >> um
> > > > >> >> >> >> 21:01 Uhr:
> > > > >> >> >> >>
> > > > >> >> >> >> > So let's start with the CLASS retention annotations
> > first.
> > > > I'll
> > > > >> >> commit
> > > > >> >> >> >> > later today.
> > > > >> >> >> >> >
> > > > >> >> >> >>
> > > > >> >> >> >> Maybe create a GitHub PR so people can have a look before
> > it
> > > > goes
> > > > >> to
> > > > >> >> >> >> master?
> > > > >> >> >> >>
> > > > >> >> >> >> Benedikt
> > > > >> >> >> >>
> > > > >> >> >> >>
> > > > >> >> >> >> >
> > > > >> >> >> >> > Gary
> > > > >> >> >> >> >
> > > > >> >> >> >> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <
> boards@gmail.com
> > >
> > > > >> wrote:
> > > > >> >> >> >> >
> > > > >> >> >> >> > > I feel like documenting thread safety in such a low
> > > level,
> > > > >> widely
> > > > >> >> >> used
> > > > >> >> >> >> > > library like [lang] is a great idea. Whether it uses
> > > > >> annotations,
> > > > >> >> >> >> > javadocs,
> > > > >> >> >> >> > > or some sort of informal javadoc comments isn't too
> > big a
> > > > >> deal to
> > > > >> >> >> me,
> > > > >> >> >> >> but
> > > > >> >> >> >> > > providing some guarantees of thread safety or lack
> > > thereof
> > > > >> would
> > > > >> >> be
> > > > >> >> >> >> > > invaluable information.
> > > > >> >> >> >> > >
> > > > >> >> >> >> > > On 27 November 2016 at 07:11, Benedikt Ritter <
> > > > >> >> britter@apache.org>
> > > > >> >> >> >> > wrote:
> > > > >> >> >> >> > >
> > > > >> >> >> >> > > > I thought we decided to abstain from documenting
> > thread
> > > > >> safety
> > > > >> >> >> since
> > > > >> >> >> >> it
> > > > >> >> >> >> > > > would get outdated quickly anyway.
> > > > >> >> >> >> > > >
> > > > >> >> >> >> > > > Gary Gregory <ga...@gmail.com> schrieb am
> > So.,
> > > > 27.
> > > > >> Nov.
> > > > >> >> >> 2016
> > > > >> >> >> >> um
> > > > >> >> >> >> > > > 09:11 Uhr:
> > > > >> >> >> >> > > >
> > > > >> >> >> >> > > > > But if we then want a runtime version we had an
> odd
> > > > >> packaging
> > > > >> >> >> with
> > > > >> >> >> >> > > CLASS
> > > > >> >> >> >> > > > > retention in .concurrent. and RUNTIME in
> > > > >> .concurrent.runtime.
> > > > >> >> >> >> > > > >
> > > > >> >> >> >> > > > > I might be in YAGNI territory here...
> > > > >> >> >> >> > > > >
> > > > >> >> >> >> > > > > Gary
> > > > >> >> >> >> > > > >
> > > > >> >> >> >> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <
> > > > >> >> boards@gmail.com
> > > > >> >> >> >
> > > > >> >> >> >> > > wrote:
> > > > >> >> >> >> > > > >
> > > > >> >> >> >> > > > > > I think adding the additional clazz/runtime
> > package
> > > > >> would
> > > > >> >> be a
> > > > >> >> >> >> > little
> > > > >> >> >> >> > > > > > overkill if you only include one packaging
> option
> > > for
> > > > >> now.
> > > > >> >> >> >> > > > > >
> > > > >> >> >> >> > > > > > On 27 November 2016 at 00:04, Gary Gregory <
> > > > >> >> >> >> garydgregory@gmail.com
> > > > >> >> >> >> > >
> > > > >> >> >> >> > > > > wrote:
> > > > >> >> >> >> > > > > >
> > > > >> >> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <
> > > > >> boards@gmail.com
> > > > >> >> >
> > > > >> >> >> >> wrote:
> > > > >> >> >> >> > > > > > > >
> > > > >> >> >> >> > > > > > > > I can think of a couple use cases for
> runtime
> > > > >> retention
> > > > >> >> >> for
> > > > >> >> >> >> > > thread
> > > > >> >> >> >> > > > > > safety
> > > > >> >> >> >> > > > > > > > annotations, but they're not specific to
> > > commons
> > > > >> lang.
> > > > >> >> >> >> > > > > > > >
> > > > >> >> >> >> > > > > > > > 1. A framework could choose what type of
> data
> > > > >> >> structure or
> > > > >> >> >> >> > > > algorithm
> > > > >> >> >> >> > > > > to
> > > > >> >> >> >> > > > > > > use
> > > > >> >> >> >> > > > > > > > at runtime based on the presence of which
> > > thread
> > > > >> safety
> > > > >> >> >> >> > > annotation
> > > > >> >> >> >> > > > is
> > > > >> >> >> >> > > > > > on.
> > > > >> >> >> >> > > > > > > > Same for mutability.
> > > > >> >> >> >> > > > > > > > 2. A testing framework could use these
> > > > annotations
> > > > >> to
> > > > >> >> try
> > > > >> >> >> and
> > > > >> >> >> >> > > > > automate
> > > > >> >> >> >> > > > > > > some
> > > > >> >> >> >> > > > > > > > sort of thread safety tests, though that
> > sounds
> > > > >> like a
> > > > >> >> >> hard
> > > > >> >> >> >> > > problem
> > > > >> >> >> >> > > > > to
> > > > >> >> >> >> > > > > > > > actually implement.
> > > > >> >> >> >> > > > > > > >
> > > > >> >> >> >> > > > > > > > However, it'd be easier to just start with
> > > class
> > > > >> >> retention
> > > > >> >> >> >> (or
> > > > >> >> >> >> > > > source
> > > > >> >> >> >> > > > > > > > retention) just for documentation purposes.
> > > > Higher
> > > > >> >> >> retention
> > > > >> >> >> >> > > levels
> > > > >> >> >> >> > > > > > could
> > > > >> >> >> >> > > > > > > > be added later if an important use case
> came
> > > up.
> > > > >> >> >> >> > > > > > >
> > > > >> >> >> >> > > > > > > But which packaging option?
> > > > >> >> >> >> > > > > > >
> > > > >> >> >> >> > > > > > > Gary
> > > > >> >> >> >> > > > > > > >
> > > > >> >> >> >> > > > > > > > On 26 November 2016 at 19:56, Gary Gregory
> <
> > > > >> >> >> >> > > garydgregory@gmail.com
> > > > >> >> >> >> > > > >
> > > > >> >> >> >> > > > > > > wrote:
> > > > >> >> >> >> > > > > > > >
> > > > >> >> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <
> > > > >> >> sebbaz@gmail.com
> > > > >> >> >> >
> > > > >> >> >> >> > > wrote:
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary
> > Gregory
> > > <
> > > > >> >> >> >> > > > > garydgregory@gmail.com
> > > > >> >> >> >> > > > > > >
> > > > >> >> >> >> > > > > > > > > wrote:
> > > > >> >> >> >> > > > > > > > > > > On a [crypto] thread, I mentioned
> > > > >> >> >> >> > > > http://pastebin.com/RKPGGdJ9
> > > > >> >> >> >> > > > > > to
> > > > >> >> >> >> > > > > > > add
> > > > >> >> >> >> > > > > > > > > > the
> > > > >> >> >> >> > > > > > > > > > > "classic" four
> > > javax.annotation.concurrent
> > > > >> >> >> annotations
> > > > >> >> >> >> to
> > > > >> >> >> >> > > two
> > > > >> >> >> >> > > > > > > packages
> > > > >> >> >> >> > > > > > > > > > > (.clazz and .runtime) in Commons Lang
> > for
> > > > >> CLASS
> > > > >> >> and
> > > > >> >> >> >> > RUNTIME
> > > > >> >> >> >> > > > > > > retentions.
> > > > >> >> >> >> > > > > > > > > > >
> > > > >> >> >> >> > > > > > > > > > > You'd use the CLASS version to avoid
> a
> > > hard
> > > > >> >> >> dependency
> > > > >> >> >> >> on
> > > > >> >> >> >> > > > > [lang].
> > > > >> >> >> >> > > > > > > > > RUNTIME
> > > > >> >> >> >> > > > > > > > > > > to keep them around.
> > > > >> >> >> >> > > > > > > > > > >
> > > > >> >> >> >> > > > > > > > > > > We'd use the CLASS versions in all of
> > > > Commons
> > > > >> for
> > > > >> >> >> >> > > documenting
> > > > >> >> >> >> > > > > > > thread
> > > > >> >> >> >> > > > > > > > > > safety.
> > > > >> >> >> >> > > > > > > > > > >
> > > > >> >> >> >> > > > > > > > > > > Thoughts?
> > > > >> >> >> >> > > > > > > > > >
> > > > >> >> >> >> > > > > > > > > > Definitely Class retention, not
> Runtime.
> > > > >> >> >> >> > > > > > > > > > You don't want to have to include the
> > > > annotation
> > > > >> >> jar
> > > > >> >> >> on
> > > > >> >> >> >> the
> > > > >> >> >> >> > > > > runtime
> > > > >> >> >> >> > > > > > > > > > classpath.
> > > > >> >> >> >> > > > > > > > > >
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > > > Hi Sebb,
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > > > Right now I have both of these packages:
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> > > > >> >> annotation.concurrent.clazz
> > > > >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> > > > >> >> >> annotation.concurrent.runtime
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > > > Each with a copy of:
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > > > GuardedBy
> > > > >> >> >> >> > > > > > > > > Immutable
> > > > >> >> >> >> > > > > > > > > NotThreadSafe
> > > > >> >> >> >> > > > > > > > > ThreadSafe
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > > > Should we include what I have as is?
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > > > If we were to only provide the annotation
> > at
> > > > the
> > > > >> >> CLASS
> > > > >> >> >> >> > > retention
> > > > >> >> >> >> > > > > > level,
> > > > >> >> >> >> > > > > > > > > should we still package them in
> > > > >> >> >> >> > ...annotation.concurrent.clazz
> > > > >> >> >> >> > > in
> > > > >> >> >> >> > > > > > case
> > > > >> >> >> >> > > > > > > we
> > > > >> >> >> >> > > > > > > > > want to provide
> > annotation.concurrent.runtime
> > > > >> later?
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > > > If we know for certain we never want to
> > > provide
> > > > >> >> RUNTIME
> > > > >> >> >> >> > > > retention,
> > > > >> >> >> >> > > > > we
> > > > >> >> >> >> > > > > > > can
> > > > >> >> >> >> > > > > > > > > put them all in annotation.concurrent
> now.
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > > > Thoughts?
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > > > Gary
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > > > > [I don't know why the annotations were
> > ever
> > > > >> >> considered
> > > > >> >> >> >> > > suitable
> > > > >> >> >> >> > > > > for
> > > > >> >> >> >> > > > > > > > > > runtime]
> > > > >> >> >> >> > > > > > > > > >
> > > > >> >> >> >> > > > > > > > > > > Gary
> > > > >> >> >> >> > > > > > > > > > >
> > > > >> >> >> >> > > > > > > > > > > --
> > > > >> >> >> >> > > > > > > > > > > E-Mail: garydgregory@gmail.com |
> > > > >> >> >> ggregory@apache.org
> > > > >> >> >> >> > > > > > > > > > > Java Persistence with Hibernate,
> Second
> > > > >> Edition
> > > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > > >> >> >> >> product/1617290459/ref=as_li_
> > > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > >> >> >> >> 9325&creativeASIN=1617290459&
> > > > >> >> >> >> > > > > > > > > >
> > > > >> >> >> >> > > > > > >
> > > > >> >> >> >> > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2
> > > > >> >> >> >> > > b8>
> > > > >> >> >> >> > > > > > > > > > >
> > > > >> >> >> >> > > > > > > > > > > <http:////
> > > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > > >> >> >> a=
> > > > >> >> >> >> > > > > > > > > > 1617290459>
> > > > >> >> >> >> > > > > > > > > > > JUnit in Action, Second Edition
> > > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > > >> >> >> >> product/1935182021/ref=as_li_
> > > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > >> >> >> >> 9325&creativeASIN=1935182021&
> > > > >> >> >> >> > > > > > > > > > linkCode=as2&tag=garygregory-
> 20&linkId=
> > > > >> >> >> >> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > >> >> >> >> > > > > > > > > 18%22
> > > > >> >> >> >> > > > > > > > > > >
> > > > >> >> >> >> > > > > > > > > > >
> > > > >> >> >> >> > > > > > > > > > > <http:////
> > > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > > >> >> >> a=
> > > > >> >> >> >> > > > > > > > > > 1935182021>
> > > > >> >> >> >> > > > > > > > > > > Spring Batch in Action
> > > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > > >> >> >> >> product/1935182951/ref=as_li_
> > > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > >> >> >> >> 9325&creativeASIN=1935182951&
> > > > >> >> >> >> > > > > > > > > >
> > > > >> >> >> >> > linkCode=%7B%7BlinkCode%7D%7D&
> > > tag=garygregory-20&linkId=%7B%
> > > > >> >> >> >> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+
> > > Batch+in+Action>
> > > > >> >> >> >> > > > > > > > > > > <http:////
> > > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > > >> >> >> a=
> > > > >> >> >> >> > > > > > > > > > 1935182951>
> > > > >> >> >> >> > > > > > > > > > > Blog: http://garygregory.wordpress.
> com
> > > > >> >> >> >> > > > > > > > > > > Home: http://garygregory.com/
> > > > >> >> >> >> > > > > > > > > > > Tweet!
> http://twitter.com/GaryGregory
> > > > >> >> >> >> > > > > > > > > >
> > > > >> >> >> >> > > > > > > > > >
> > > > >> >> >> >> > ------------------------------
> > > ------------------------------
> > > > >> >> >> >> > > > > > > ---------
> > > > >> >> >> >> > > > > > > > > > To unsubscribe, e-mail:
> > > > dev-unsubscribe@commons.
> > > > >> >> >> >> apache.org
> > > > >> >> >> >> > > > > > > > > > For additional commands, e-mail:
> > > > >> >> >> >> > dev-help@commons.apache.org
> > > > >> >> >> >> > > > > > > > > >
> > > > >> >> >> >> > > > > > > > > >
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > > > --
> > > > >> >> >> >> > > > > > > > > E-Mail: garydgregory@gmail.com |
> > > > >> ggregory@apache.org
> > > > >> >> >> >> > > > > > > > > Java Persistence with Hibernate, Second
> > > Edition
> > > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > > >> >> >> product/1617290459/ref=as_li_
> > > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > >> >> >> >> 9325&creativeASIN=1617290459&
> > > > >> >> >> >> > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > >> >> >> >> > > > > > cadb800f39946ec62ea2b1af9fe6a2
> > > > >> >> >> >> > > > > > > b8>
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> > adsystem.com/e/ir?t=
> > > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > > >> >> >> >> > > > > > > > > 1617290459>
> > > > >> >> >> >> > > > > > > > > JUnit in Action, Second Edition
> > > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > > >> >> >> product/1935182021/ref=as_li_
> > > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > >> >> >> >> 9325&creativeASIN=1935182021&
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > >> >> >> >> > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > >> >> >> >> > > > > > 18%22
> > > > >> >> >> >> > > > > > > > > >
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> > adsystem.com/e/ir?t=
> > > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > > >> >> >> >> > > > > > > > > 1935182021>
> > > > >> >> >> >> > > > > > > > > Spring Batch in Action
> > > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > > >> >> >> product/1935182951/ref=as_li_
> > > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > > >> >> >> >> 9325&creativeASIN=1935182951&
> > > > >> >> >> >> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
> > > > >> >> >> >> tag=garygregory-20&linkId=%7B%
> > > > >> >> >> >> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+
> > Batch+in+Action>
> > > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> > adsystem.com/e/ir?t=
> > > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > > >> >> >> >> > > > > > > > > 1935182951>
> > > > >> >> >> >> > > > > > > > > Blog: http://garygregory.wordpress.com
> > > > >> >> >> >> > > > > > > > > Home: http://garygregory.com/
> > > > >> >> >> >> > > > > > > > > Tweet! http://twitter.com/GaryGregory
> > > > >> >> >> >> > > > > > > > >
> > > > >> >> >> >> > > > > > > >
> > > > >> >> >> >> > > > > > > >
> > > > >> >> >> >> > > > > > > >
> > > > >> >> >> >> > > > > > > > --
> > > > >> >> >> >> > > > > > > > Matt Sicker <bo...@gmail.com>
> > > > >> >> >> >> > > > > > >
> > > > >> >> >> >> > > > > >
> > > > >> >> >> >> > > > > >
> > > > >> >> >> >> > > > > >
> > > > >> >> >> >> > > > > > --
> > > > >> >> >> >> > > > > > Matt Sicker <bo...@gmail.com>
> > > > >> >> >> >> > > > > >
> > > > >> >> >> >> > > > >
> > > > >> >> >> >> > > > >
> > > > >> >> >> >> > > > >
> > > > >> >> >> >> > > > > --
> > > > >> >> >> >> > > > > E-Mail: garydgregory@gmail.com |
> > ggregory@apache.org
> > > > >> >> >> >> > > > > Java Persistence with Hibernate, Second Edition
> > > > >> >> >> >> > > > > <
> > > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > > product/1617290459/ref=as_li_
> > > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > > 9325&creativeASIN=1617290459&
> > > > >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2b8
> > > > >> >> >> >> > > > > >
> > > > >> >> >> >> > > > >
> > > > >> >> >> >> > > > > <http:////
> > > > >> >> >> >> > > > >
> > > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> > ir?t=garygregory-20&l=am2&o=1&
> > > > >> >> >> a=1617290459
> > > > >> >> >> >> > > >
> > > > >> >> >> >> > > > > JUnit in Action, Second Edition
> > > > >> >> >> >> > > > > <
> > > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > > product/1935182021/ref=as_li_
> > > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > > 9325&creativeASIN=1935182021&
> > > > >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > >> >> >> >> 31ecd1f6b6d1eaf8886ac902a24de4
> > > > >> >> >> >> > > 18%22
> > > > >> >> >> >> > > > > >
> > > > >> >> >> >> > > > >
> > > > >> >> >> >> > > > > <http:////
> > > > >> >> >> >> > > > >
> > > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> > ir?t=garygregory-20&l=am2&o=1&
> > > > >> >> >> a=1935182021
> > > > >> >> >> >> > > >
> > > > >> >> >> >> > > > > Spring Batch in Action
> > > > >> >> >> >> > > > > <
> > > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > > product/1935182951/ref=as_li_
> > > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > > 9325&creativeASIN=1935182951&
> > > > >> >> >> >> > > > linkCode=%7B%7BlinkCode%7D%7D&
> > > > >> tag=garygregory-20&linkId=%7B%
> > > > >> >> >> >> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> > > > >> >> >> >> > > > > >
> > > > >> >> >> >> > > > > <http:////
> > > > >> >> >> >> > > > >
> > > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> > ir?t=garygregory-20&l=am2&o=1&
> > > > >> >> >> a=1935182951
> > > > >> >> >> >> > > >
> > > > >> >> >> >> > > > > Blog: http://garygregory.wordpress.com
> > > > >> >> >> >> > > > > Home: http://garygregory.com/
> > > > >> >> >> >> > > > > Tweet! http://twitter.com/GaryGregory
> > > > >> >> >> >> > > > >
> > > > >> >> >> >> > > >
> > > > >> >> >> >> > >
> > > > >> >> >> >> > >
> > > > >> >> >> >> > >
> > > > >> >> >> >> > > --
> > > > >> >> >> >> > > Matt Sicker <bo...@gmail.com>
> > > > >> >> >> >> > >
> > > > >> >> >> >> >
> > > > >> >> >> >>
> > > > >> >> >> >
> > > > >> >> >> >
> > > > >> >> >> >
> > > > >> >> >> > --
> > > > >> >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > >> >> >> > Java Persistence with Hibernate, Second Edition
> > > > >> >> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > >> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > >> >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > >> cadb800f39946ec62ea2b1af9fe6a2
> > > > >> >> b8>
> > > > >> >> >> >
> > > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > >> >> garygregory-20&l=am2&o=1&a=
> > > > >> >> >> 1617290459>
> > > > >> >> >> > JUnit in Action, Second Edition
> > > > >> >> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > >> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > >> >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > >> 31ecd1f6b6d1eaf8886ac902a24de4
> > > > >> >> 18%22
> > > > >> >> >> >
> > > > >> >> >> >
> > > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > >> >> garygregory-20&l=am2&o=1&a=
> > > > >> >> >> 1935182021>
> > > > >> >> >> > Spring Batch in Action
> > > > >> >> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > >> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > >> >> >> linkCode=%7B%7BlinkCode%7D%7D&
> tag=garygregory-20&linkId=%7B%
> > > > >> >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > >> >> garygregory-20&l=am2&o=1&a=
> > > > >> >> >> 1935182951>
> > > > >> >> >> > Blog: http://garygregory.wordpress.com
> > > > >> >> >> > Home: http://garygregory.com/
> > > > >> >> >> > Tweet! http://twitter.com/GaryGregory
> > > > >> >> >>
> > > > >> >> >> ------------------------------
> ------------------------------
> > > > >> ---------
> > > > >> >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > >> >> >> For additional commands, e-mail:
> dev-help@commons.apache.org
> > > > >> >> >>
> > > > >> >> >>
> > > > >> >> >
> > > > >> >> >
> > > > >> >> > --
> > > > >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > >> >> > Java Persistence with Hibernate, Second Edition
> > > > >> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > cadb800f39946ec62ea2b1af9fe6a2
> > > > >> b8>
> > > > >> >> >
> > > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > >> garygregory-20&l=am2&o=1&a=
> > > > >> >> 1617290459>
> > > > >> >> > JUnit in Action, Second Edition
> > > > >> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > >> 18%22
> > > > >> >> >
> > > > >> >> >
> > > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > >> garygregory-20&l=am2&o=1&a=
> > > > >> >> 1935182021>
> > > > >> >> > Spring Batch in Action
> > > > >> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > >> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > >> garygregory-20&l=am2&o=1&a=
> > > > >> >> 1935182951>
> > > > >> >> > Blog: http://garygregory.wordpress.com
> > > > >> >> > Home: http://garygregory.com/
> > > > >> >> > Tweet! http://twitter.com/GaryGregory
> > > > >> >>
> > > > >> >> ------------------------------------------------------------
> > > > ---------
> > > > >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > >> >> For additional commands, e-mail: dev-help@commons.apache.org
> > > > >> >>
> > > > >> >>
> > > > >> >
> > > > >> >
> > > > >> > --
> > > > >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > >> > Java Persistence with Hibernate, Second Edition
> > > > >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > >> linkCode=as2&tag=garygregory-20&linkId=
> > cadb800f39946ec62ea2b1af9fe6a2
> > > > b8>
> > > > >> >
> > > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > garygregory-20&l=am2&o=1&a=
> > > > >> 1617290459>
> > > > >> > JUnit in Action, Second Edition
> > > > >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > >> linkCode=as2&tag=garygregory-20&linkId=
> > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > 18%22
> > > > >> >
> > > > >> >
> > > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > garygregory-20&l=am2&o=1&a=
> > > > >> 1935182021>
> > > > >> > Spring Batch in Action
> > > > >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > garygregory-20&l=am2&o=1&a=
> > > > >> 1935182951>
> > > > >> > Blog: http://garygregory.wordpress.com
> > > > >> > Home: http://garygregory.com/
> > > > >> > Tweet! http://twitter.com/GaryGregory
> > > > >>
> > > > >> ------------------------------------------------------------
> > ---------
> > > > >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > >> For additional commands, e-mail: dev-help@commons.apache.org
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > > > --
> > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > Java Persistence with Hibernate, Second Edition
> > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > linkCode=as2&tag=garygregory-20&linkId=
> cadb800f39946ec62ea2b1af9fe6a2
> > b8>
> > > > >
> > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > garygregory-20&l=am2&o=1&a=
> > > > 1617290459>
> > > > > JUnit in Action, Second Edition
> > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > linkCode=as2&tag=garygregory-20&linkId=
> 31ecd1f6b6d1eaf8886ac902a24de4
> > > 18%22
> > > > >
> > > > >
> > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > garygregory-20&l=am2&o=1&a=
> > > > 1935182021>
> > > > > Spring Batch in Action
> > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > garygregory-20&l=am2&o=1&a=
> > > > 1935182951>
> > > > > Blog: http://garygregory.wordpress.com
> > > > > Home: http://garygregory.com/
> > > > > Tweet! http://twitter.com/GaryGregory
> > > >
> > > > ------------------------------------------------------------
> ---------
> > > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > For additional commands, e-mail: dev-help@commons.apache.org
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > Matt Sicker <bo...@gmail.com>
> >
>



-- 
Matt Sicker <bo...@gmail.com>

Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
I do not think we should use an official Java package because the JSR 305
page says "The Executive Committee voted to list this JSR as dormant in May
2012."

Gary

On Nov 27, 2016 6:39 PM, "Matt Sicker" <bo...@gmail.com> wrote:

> If you're going to share the annotations between projects, why not use a
> JSR package for it like the google one? I thought the idea of embedding the
> annotations in [lang] was to prevent the need for the dependency and to use
> it internally, not as a public annotation for other projects to use.
>
> On 27 November 2016 at 19:55, Gary Gregory <ga...@gmail.com> wrote:
>
> > Are you suggesting [lang] becomes a multi-module project?
> >
> > Gary
> >
> > On Nov 27, 2016 5:01 PM, "sebb" <se...@gmail.com> wrote:
> >
> > > On 28 November 2016 at 00:11, Gary Gregory <ga...@gmail.com>
> > wrote:
> > > > On Sun, Nov 27, 2016 at 4:09 PM, sebb <se...@gmail.com> wrote:
> > > >
> > > >> On 27 November 2016 at 23:51, Gary Gregory <ga...@gmail.com>
> > > wrote:
> > > >> > On Sun, Nov 27, 2016 at 3:41 PM, sebb <se...@gmail.com> wrote:
> > > >> >
> > > >> >> On 27 November 2016 at 22:31, Gary Gregory <
> garydgregory@gmail.com
> > >
> > > >> wrote:
> > > >> >> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <se...@gmail.com>
> wrote:
> > > >> >> >
> > > >> >> >> On 27 November 2016 at 22:03, Gary Gregory <
> > > garydgregory@gmail.com>
> > > >> >> wrote:
> > > >> >> >> > These annotations are the SAME as have been published all
> over
> > > the
> > > >> >> place,
> > > >> >> >> > so I do not think we need a PR for review. Reviewing the
> code
> > in
> > > >> the
> > > >> >> repo
> > > >> >> >> > should be enough, but I'm not sure _what_ there is to review
> > > >> really.
> > > >> >> I've
> > > >> >> >> > already posted a link to the sources (a pastebin link). I'll
> > > >> create a
> > > >> >> >> Jira
> > > >> >> >> > of course.
> > > >> >> >>
> > > >> >> >> There is one aspect that needs review: does the annotation
> > belong
> > > in
> > > >> >> LANG?
> > > >> >> >> If we want to use the annotation in other components, do they
> > > have to
> > > >> >> >> depend on LANG?
> > > >> >> >>
> > > >> >> >
> > > >> >> > No see below and previous messages.
> > > >> >> >
> > > >> >> >
> > > >> >> >> If not, do they all have their own copies?
> > > >> >> >>
> > > >> >> >
> > > >> >> > No.
> > > >> >> >
> > > >> >> >
> > > >> >> >>
> > > >> >> >> And what happens when LANG needs a non-BC release?
> > > >> >> >>
> > > >> >> >
> > > >> >> > What is the issue I am missing?
> > > >> >> >
> > > >> >>
> > > >> >> The package name for the annotation might need to change
> > > >> >> That would be a downstream nuisance.
> > > >> >>
> > > >> >
> > > >> > Hi All,
> > > >> >
> > > >> > How is that different than changing the package name for any of
> our
> > > other
> > > >> > lang types?
> > > >>
> > > >> It's not.
> > > >>
> > > >> > If you want move a package, you have to break BC and we have clear
> > > >> > guidelines for that task.
> > > >>
> > > >> But why should I have to change package imports for annotations just
> > > >> because they happen to be in LANG?
> > > >>
> > > >> Note that this could get confusing.
> > > >>
> > > >> Say XYZ component starts out only needing lang for the annotations.
> > > >> So they include LANG 3.x and code the annotations.
> > > >>
> > > >> Later they find they want LANG 4.x for runtime.
> > > >> They would then need to drop the LANG 3.x dependency, fix up all the
> > > >> annotation imports etc.
> > > >> Unnecessary work if the annotations were in a separate component.
> > > >>
> > > >> Also, any tool that wants to check the annotations will have to look
> > > >> for them in lots of packages.
> > > >>
> > > >> Whilst it can no doubt be made to work, it's going to cause problems
> > > later.
> > > >>
> > > >
> > > > To be on the playful side, this is what my mother calls "borrowing
> > > trouble"
> > > > ;-)
> > > >
> > > > We can future-trip ourselves in all sorts of troubles. Our
> imaginations
> > > > know no bounds!  :-)
> > >
> > > This is not an imaginary scenario.
> > >
> > > We know that LANG will have a non-BC release at some point.
> > > The plan is to allow non-LANG components to share the LANG annotations.
> > > We know that components which originally don't need LANG may end up
> > > needing LANG at run-time.
> > > Therefore the problem will occur.
> > >
> > > In this case, "look before you leap" is appropriate.
> > >
> > > > Gary
> > > >
> > > >
> > > >>
> > > >> > Since already have a package called org.apache.commons.lang3.
> > > concurrent,
> > > >> I
> > > >> > propose we place these annottaions in
> > > >> > org.apache.commons.lang3.concurrent.annotation.
> > > >> >
> > > >> >
> > > >> >> >>
> > > >> >> >> My expectation for such annotations is that they would be
> > > >> >> >> self-contained (or built-in to the languange, not LANG).
> > > >> >> >>
> > > >> >> >
> > > >> >> > It is _because_ they are NOT built-in the language or JRE that
> we
> > > are
> > > >> >> > proposing they belong in [lang].
> > > >> >> >
> > > >> >> > Since we are providing the annotation with CLASS retention only
> > > >> >> > (initially), there is no hard dependency on [lang] at runtime.
> > > >> >> >
> > > >> >> > Is there some subtlety we are missing?
> > > >> >>
> > > >> >> Yes, the compile-time dependency.
> > > >> >>
> > > >> >
> > > >> > No surprise, right? You can't use an annotation without compiling
> > the
> > > >> > source file.
> > > >> >
> > > >> >
> > > >> >> AFAIK it's not possible to have a Maven compile-only dependency;
> > > >> >> compile-time implies run-time.
> > > >> >>
> > > >> >
> > > >> > That's a tooling issue of course which should not invalidate the
> > > >> worthiness
> > > >> > of this feature.
> > > >> >
> > > >> > If I am a downstream user of Commons Lang's new annotations, I
> would
> > > >> need a
> > > >> > Maven scope that says "I need [lang] as a compile time only
> > > dependency" I
> > > >> > do not see such a scope on
> > > >> > https://maven.apache.org/guides/introduction/
> > > introduction-to-dependency-
> > > >> mechanism.html#Dependency_Scope
> > > >> >
> > > >> > Time for a Jira!
> > > >> >
> > > >> > I wonder what Gradle offers users in this dept.?
> > > >> >
> > > >> > Gary
> > > >> >
> > > >> >
> > > >> >>
> > > >> >> > Gary
> > > >> >> >
> > > >> >> >
> > > >> >> >> > Gary
> > > >> >> >> >
> > > >> >> >> > On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <
> > > >> britter@apache.org>
> > > >> >> >> wrote:
> > > >> >> >> >
> > > >> >> >> >> Hi,
> > > >> >> >> >>
> > > >> >> >> >> Gary Gregory <ga...@gmail.com> schrieb am So., 27.
> > Nov.
> > > >> 2016
> > > >> >> um
> > > >> >> >> >> 21:01 Uhr:
> > > >> >> >> >>
> > > >> >> >> >> > So let's start with the CLASS retention annotations
> first.
> > > I'll
> > > >> >> commit
> > > >> >> >> >> > later today.
> > > >> >> >> >> >
> > > >> >> >> >>
> > > >> >> >> >> Maybe create a GitHub PR so people can have a look before
> it
> > > goes
> > > >> to
> > > >> >> >> >> master?
> > > >> >> >> >>
> > > >> >> >> >> Benedikt
> > > >> >> >> >>
> > > >> >> >> >>
> > > >> >> >> >> >
> > > >> >> >> >> > Gary
> > > >> >> >> >> >
> > > >> >> >> >> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <boards@gmail.com
> >
> > > >> wrote:
> > > >> >> >> >> >
> > > >> >> >> >> > > I feel like documenting thread safety in such a low
> > level,
> > > >> widely
> > > >> >> >> used
> > > >> >> >> >> > > library like [lang] is a great idea. Whether it uses
> > > >> annotations,
> > > >> >> >> >> > javadocs,
> > > >> >> >> >> > > or some sort of informal javadoc comments isn't too
> big a
> > > >> deal to
> > > >> >> >> me,
> > > >> >> >> >> but
> > > >> >> >> >> > > providing some guarantees of thread safety or lack
> > thereof
> > > >> would
> > > >> >> be
> > > >> >> >> >> > > invaluable information.
> > > >> >> >> >> > >
> > > >> >> >> >> > > On 27 November 2016 at 07:11, Benedikt Ritter <
> > > >> >> britter@apache.org>
> > > >> >> >> >> > wrote:
> > > >> >> >> >> > >
> > > >> >> >> >> > > > I thought we decided to abstain from documenting
> thread
> > > >> safety
> > > >> >> >> since
> > > >> >> >> >> it
> > > >> >> >> >> > > > would get outdated quickly anyway.
> > > >> >> >> >> > > >
> > > >> >> >> >> > > > Gary Gregory <ga...@gmail.com> schrieb am
> So.,
> > > 27.
> > > >> Nov.
> > > >> >> >> 2016
> > > >> >> >> >> um
> > > >> >> >> >> > > > 09:11 Uhr:
> > > >> >> >> >> > > >
> > > >> >> >> >> > > > > But if we then want a runtime version we had an odd
> > > >> packaging
> > > >> >> >> with
> > > >> >> >> >> > > CLASS
> > > >> >> >> >> > > > > retention in .concurrent. and RUNTIME in
> > > >> .concurrent.runtime.
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > > I might be in YAGNI territory here...
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > > Gary
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <
> > > >> >> boards@gmail.com
> > > >> >> >> >
> > > >> >> >> >> > > wrote:
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > > > I think adding the additional clazz/runtime
> package
> > > >> would
> > > >> >> be a
> > > >> >> >> >> > little
> > > >> >> >> >> > > > > > overkill if you only include one packaging option
> > for
> > > >> now.
> > > >> >> >> >> > > > > >
> > > >> >> >> >> > > > > > On 27 November 2016 at 00:04, Gary Gregory <
> > > >> >> >> >> garydgregory@gmail.com
> > > >> >> >> >> > >
> > > >> >> >> >> > > > > wrote:
> > > >> >> >> >> > > > > >
> > > >> >> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <
> > > >> boards@gmail.com
> > > >> >> >
> > > >> >> >> >> wrote:
> > > >> >> >> >> > > > > > > >
> > > >> >> >> >> > > > > > > > I can think of a couple use cases for runtime
> > > >> retention
> > > >> >> >> for
> > > >> >> >> >> > > thread
> > > >> >> >> >> > > > > > safety
> > > >> >> >> >> > > > > > > > annotations, but they're not specific to
> > commons
> > > >> lang.
> > > >> >> >> >> > > > > > > >
> > > >> >> >> >> > > > > > > > 1. A framework could choose what type of data
> > > >> >> structure or
> > > >> >> >> >> > > > algorithm
> > > >> >> >> >> > > > > to
> > > >> >> >> >> > > > > > > use
> > > >> >> >> >> > > > > > > > at runtime based on the presence of which
> > thread
> > > >> safety
> > > >> >> >> >> > > annotation
> > > >> >> >> >> > > > is
> > > >> >> >> >> > > > > > on.
> > > >> >> >> >> > > > > > > > Same for mutability.
> > > >> >> >> >> > > > > > > > 2. A testing framework could use these
> > > annotations
> > > >> to
> > > >> >> try
> > > >> >> >> and
> > > >> >> >> >> > > > > automate
> > > >> >> >> >> > > > > > > some
> > > >> >> >> >> > > > > > > > sort of thread safety tests, though that
> sounds
> > > >> like a
> > > >> >> >> hard
> > > >> >> >> >> > > problem
> > > >> >> >> >> > > > > to
> > > >> >> >> >> > > > > > > > actually implement.
> > > >> >> >> >> > > > > > > >
> > > >> >> >> >> > > > > > > > However, it'd be easier to just start with
> > class
> > > >> >> retention
> > > >> >> >> >> (or
> > > >> >> >> >> > > > source
> > > >> >> >> >> > > > > > > > retention) just for documentation purposes.
> > > Higher
> > > >> >> >> retention
> > > >> >> >> >> > > levels
> > > >> >> >> >> > > > > > could
> > > >> >> >> >> > > > > > > > be added later if an important use case came
> > up.
> > > >> >> >> >> > > > > > >
> > > >> >> >> >> > > > > > > But which packaging option?
> > > >> >> >> >> > > > > > >
> > > >> >> >> >> > > > > > > Gary
> > > >> >> >> >> > > > > > > >
> > > >> >> >> >> > > > > > > > On 26 November 2016 at 19:56, Gary Gregory <
> > > >> >> >> >> > > garydgregory@gmail.com
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > > > > wrote:
> > > >> >> >> >> > > > > > > >
> > > >> >> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <
> > > >> >> sebbaz@gmail.com
> > > >> >> >> >
> > > >> >> >> >> > > wrote:
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary
> Gregory
> > <
> > > >> >> >> >> > > > > garydgregory@gmail.com
> > > >> >> >> >> > > > > > >
> > > >> >> >> >> > > > > > > > > wrote:
> > > >> >> >> >> > > > > > > > > > > On a [crypto] thread, I mentioned
> > > >> >> >> >> > > > http://pastebin.com/RKPGGdJ9
> > > >> >> >> >> > > > > > to
> > > >> >> >> >> > > > > > > add
> > > >> >> >> >> > > > > > > > > > the
> > > >> >> >> >> > > > > > > > > > > "classic" four
> > javax.annotation.concurrent
> > > >> >> >> annotations
> > > >> >> >> >> to
> > > >> >> >> >> > > two
> > > >> >> >> >> > > > > > > packages
> > > >> >> >> >> > > > > > > > > > > (.clazz and .runtime) in Commons Lang
> for
> > > >> CLASS
> > > >> >> and
> > > >> >> >> >> > RUNTIME
> > > >> >> >> >> > > > > > > retentions.
> > > >> >> >> >> > > > > > > > > > >
> > > >> >> >> >> > > > > > > > > > > You'd use the CLASS version to avoid a
> > hard
> > > >> >> >> dependency
> > > >> >> >> >> on
> > > >> >> >> >> > > > > [lang].
> > > >> >> >> >> > > > > > > > > RUNTIME
> > > >> >> >> >> > > > > > > > > > > to keep them around.
> > > >> >> >> >> > > > > > > > > > >
> > > >> >> >> >> > > > > > > > > > > We'd use the CLASS versions in all of
> > > Commons
> > > >> for
> > > >> >> >> >> > > documenting
> > > >> >> >> >> > > > > > > thread
> > > >> >> >> >> > > > > > > > > > safety.
> > > >> >> >> >> > > > > > > > > > >
> > > >> >> >> >> > > > > > > > > > > Thoughts?
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > > > > > > > > > Definitely Class retention, not Runtime.
> > > >> >> >> >> > > > > > > > > > You don't want to have to include the
> > > annotation
> > > >> >> jar
> > > >> >> >> on
> > > >> >> >> >> the
> > > >> >> >> >> > > > > runtime
> > > >> >> >> >> > > > > > > > > > classpath.
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > Hi Sebb,
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > Right now I have both of these packages:
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> > > >> >> annotation.concurrent.clazz
> > > >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> > > >> >> >> annotation.concurrent.runtime
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > Each with a copy of:
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > GuardedBy
> > > >> >> >> >> > > > > > > > > Immutable
> > > >> >> >> >> > > > > > > > > NotThreadSafe
> > > >> >> >> >> > > > > > > > > ThreadSafe
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > Should we include what I have as is?
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > If we were to only provide the annotation
> at
> > > the
> > > >> >> CLASS
> > > >> >> >> >> > > retention
> > > >> >> >> >> > > > > > level,
> > > >> >> >> >> > > > > > > > > should we still package them in
> > > >> >> >> >> > ...annotation.concurrent.clazz
> > > >> >> >> >> > > in
> > > >> >> >> >> > > > > > case
> > > >> >> >> >> > > > > > > we
> > > >> >> >> >> > > > > > > > > want to provide
> annotation.concurrent.runtime
> > > >> later?
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > If we know for certain we never want to
> > provide
> > > >> >> RUNTIME
> > > >> >> >> >> > > > retention,
> > > >> >> >> >> > > > > we
> > > >> >> >> >> > > > > > > can
> > > >> >> >> >> > > > > > > > > put them all in annotation.concurrent now.
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > Thoughts?
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > Gary
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > > [I don't know why the annotations were
> ever
> > > >> >> considered
> > > >> >> >> >> > > suitable
> > > >> >> >> >> > > > > for
> > > >> >> >> >> > > > > > > > > > runtime]
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > > > > > > > > > > Gary
> > > >> >> >> >> > > > > > > > > > >
> > > >> >> >> >> > > > > > > > > > > --
> > > >> >> >> >> > > > > > > > > > > E-Mail: garydgregory@gmail.com |
> > > >> >> >> ggregory@apache.org
> > > >> >> >> >> > > > > > > > > > > Java Persistence with Hibernate, Second
> > > >> Edition
> > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > >> >> >> >> product/1617290459/ref=as_li_
> > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > >> >> >> >> 9325&creativeASIN=1617290459&
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > > > > > >
> > > >> >> >> >> > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2
> > > >> >> >> >> > > b8>
> > > >> >> >> >> > > > > > > > > > >
> > > >> >> >> >> > > > > > > > > > > <http:////
> > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > >> >> >> a=
> > > >> >> >> >> > > > > > > > > > 1617290459>
> > > >> >> >> >> > > > > > > > > > > JUnit in Action, Second Edition
> > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > >> >> >> >> product/1935182021/ref=as_li_
> > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > >> >> >> >> 9325&creativeASIN=1935182021&
> > > >> >> >> >> > > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > >> >> >> >> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > >> >> >> >> > > > > > > > > 18%22
> > > >> >> >> >> > > > > > > > > > >
> > > >> >> >> >> > > > > > > > > > >
> > > >> >> >> >> > > > > > > > > > > <http:////
> > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > >> >> >> a=
> > > >> >> >> >> > > > > > > > > > 1935182021>
> > > >> >> >> >> > > > > > > > > > > Spring Batch in Action
> > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > >> >> >> >> product/1935182951/ref=as_li_
> > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > >> >> >> >> 9325&creativeASIN=1935182951&
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > linkCode=%7B%7BlinkCode%7D%7D&
> > tag=garygregory-20&linkId=%7B%
> > > >> >> >> >> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+
> > Batch+in+Action>
> > > >> >> >> >> > > > > > > > > > > <http:////
> > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > >> >> >> a=
> > > >> >> >> >> > > > > > > > > > 1935182951>
> > > >> >> >> >> > > > > > > > > > > Blog: http://garygregory.wordpress.com
> > > >> >> >> >> > > > > > > > > > > Home: http://garygregory.com/
> > > >> >> >> >> > > > > > > > > > > Tweet! http://twitter.com/GaryGregory
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > ------------------------------
> > ------------------------------
> > > >> >> >> >> > > > > > > ---------
> > > >> >> >> >> > > > > > > > > > To unsubscribe, e-mail:
> > > dev-unsubscribe@commons.
> > > >> >> >> >> apache.org
> > > >> >> >> >> > > > > > > > > > For additional commands, e-mail:
> > > >> >> >> >> > dev-help@commons.apache.org
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > --
> > > >> >> >> >> > > > > > > > > E-Mail: garydgregory@gmail.com |
> > > >> ggregory@apache.org
> > > >> >> >> >> > > > > > > > > Java Persistence with Hibernate, Second
> > Edition
> > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > >> >> >> product/1617290459/ref=as_li_
> > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > >> >> >> >> 9325&creativeASIN=1617290459&
> > > >> >> >> >> > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > >> >> >> >> > > > > > cadb800f39946ec62ea2b1af9fe6a2
> > > >> >> >> >> > > > > > > b8>
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> adsystem.com/e/ir?t=
> > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > >> >> >> >> > > > > > > > > 1617290459>
> > > >> >> >> >> > > > > > > > > JUnit in Action, Second Edition
> > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > >> >> >> product/1935182021/ref=as_li_
> > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > >> >> >> >> 9325&creativeASIN=1935182021&
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > >> >> >> >> > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > >> >> >> >> > > > > > 18%22
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> adsystem.com/e/ir?t=
> > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > >> >> >> >> > > > > > > > > 1935182021>
> > > >> >> >> >> > > > > > > > > Spring Batch in Action
> > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > >> >> >> product/1935182951/ref=as_li_
> > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > >> >> >> >> 9325&creativeASIN=1935182951&
> > > >> >> >> >> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
> > > >> >> >> >> tag=garygregory-20&linkId=%7B%
> > > >> >> >> >> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+
> Batch+in+Action>
> > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> adsystem.com/e/ir?t=
> > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > >> >> >> >> > > > > > > > > 1935182951>
> > > >> >> >> >> > > > > > > > > Blog: http://garygregory.wordpress.com
> > > >> >> >> >> > > > > > > > > Home: http://garygregory.com/
> > > >> >> >> >> > > > > > > > > Tweet! http://twitter.com/GaryGregory
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > >
> > > >> >> >> >> > > > > > > >
> > > >> >> >> >> > > > > > > >
> > > >> >> >> >> > > > > > > > --
> > > >> >> >> >> > > > > > > > Matt Sicker <bo...@gmail.com>
> > > >> >> >> >> > > > > > >
> > > >> >> >> >> > > > > >
> > > >> >> >> >> > > > > >
> > > >> >> >> >> > > > > >
> > > >> >> >> >> > > > > > --
> > > >> >> >> >> > > > > > Matt Sicker <bo...@gmail.com>
> > > >> >> >> >> > > > > >
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > > --
> > > >> >> >> >> > > > > E-Mail: garydgregory@gmail.com |
> ggregory@apache.org
> > > >> >> >> >> > > > > Java Persistence with Hibernate, Second Edition
> > > >> >> >> >> > > > > <
> > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > product/1617290459/ref=as_li_
> > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > 9325&creativeASIN=1617290459&
> > > >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> > > >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2b8
> > > >> >> >> >> > > > > >
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > > <http:////
> > > >> >> >> >> > > > >
> > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> ir?t=garygregory-20&l=am2&o=1&
> > > >> >> >> a=1617290459
> > > >> >> >> >> > > >
> > > >> >> >> >> > > > > JUnit in Action, Second Edition
> > > >> >> >> >> > > > > <
> > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > product/1935182021/ref=as_li_
> > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > 9325&creativeASIN=1935182021&
> > > >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> > > >> >> >> >> 31ecd1f6b6d1eaf8886ac902a24de4
> > > >> >> >> >> > > 18%22
> > > >> >> >> >> > > > > >
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > > <http:////
> > > >> >> >> >> > > > >
> > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> ir?t=garygregory-20&l=am2&o=1&
> > > >> >> >> a=1935182021
> > > >> >> >> >> > > >
> > > >> >> >> >> > > > > Spring Batch in Action
> > > >> >> >> >> > > > > <
> > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > product/1935182951/ref=as_li_
> > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > 9325&creativeASIN=1935182951&
> > > >> >> >> >> > > > linkCode=%7B%7BlinkCode%7D%7D&
> > > >> tag=garygregory-20&linkId=%7B%
> > > >> >> >> >> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> > > >> >> >> >> > > > > >
> > > >> >> >> >> > > > > <http:////
> > > >> >> >> >> > > > >
> > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> ir?t=garygregory-20&l=am2&o=1&
> > > >> >> >> a=1935182951
> > > >> >> >> >> > > >
> > > >> >> >> >> > > > > Blog: http://garygregory.wordpress.com
> > > >> >> >> >> > > > > Home: http://garygregory.com/
> > > >> >> >> >> > > > > Tweet! http://twitter.com/GaryGregory
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > >
> > > >> >> >> >> > >
> > > >> >> >> >> > >
> > > >> >> >> >> > >
> > > >> >> >> >> > > --
> > > >> >> >> >> > > Matt Sicker <bo...@gmail.com>
> > > >> >> >> >> > >
> > > >> >> >> >> >
> > > >> >> >> >>
> > > >> >> >> >
> > > >> >> >> >
> > > >> >> >> >
> > > >> >> >> > --
> > > >> >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > >> >> >> > Java Persistence with Hibernate, Second Edition
> > > >> >> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > >> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > >> >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > >> cadb800f39946ec62ea2b1af9fe6a2
> > > >> >> b8>
> > > >> >> >> >
> > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > >> >> garygregory-20&l=am2&o=1&a=
> > > >> >> >> 1617290459>
> > > >> >> >> > JUnit in Action, Second Edition
> > > >> >> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > >> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > >> >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > >> 31ecd1f6b6d1eaf8886ac902a24de4
> > > >> >> 18%22
> > > >> >> >> >
> > > >> >> >> >
> > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > >> >> garygregory-20&l=am2&o=1&a=
> > > >> >> >> 1935182021>
> > > >> >> >> > Spring Batch in Action
> > > >> >> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > >> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > >> >> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > >> >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > >> >> garygregory-20&l=am2&o=1&a=
> > > >> >> >> 1935182951>
> > > >> >> >> > Blog: http://garygregory.wordpress.com
> > > >> >> >> > Home: http://garygregory.com/
> > > >> >> >> > Tweet! http://twitter.com/GaryGregory
> > > >> >> >>
> > > >> >> >> ------------------------------------------------------------
> > > >> ---------
> > > >> >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > >> >> >> For additional commands, e-mail: dev-help@commons.apache.org
> > > >> >> >>
> > > >> >> >>
> > > >> >> >
> > > >> >> >
> > > >> >> > --
> > > >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > >> >> > Java Persistence with Hibernate, Second Edition
> > > >> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > cadb800f39946ec62ea2b1af9fe6a2
> > > >> b8>
> > > >> >> >
> > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > >> garygregory-20&l=am2&o=1&a=
> > > >> >> 1617290459>
> > > >> >> > JUnit in Action, Second Edition
> > > >> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > >> 18%22
> > > >> >> >
> > > >> >> >
> > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > >> garygregory-20&l=am2&o=1&a=
> > > >> >> 1935182021>
> > > >> >> > Spring Batch in Action
> > > >> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > >> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > >> garygregory-20&l=am2&o=1&a=
> > > >> >> 1935182951>
> > > >> >> > Blog: http://garygregory.wordpress.com
> > > >> >> > Home: http://garygregory.com/
> > > >> >> > Tweet! http://twitter.com/GaryGregory
> > > >> >>
> > > >> >> ------------------------------------------------------------
> > > ---------
> > > >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > >> >> For additional commands, e-mail: dev-help@commons.apache.org
> > > >> >>
> > > >> >>
> > > >> >
> > > >> >
> > > >> > --
> > > >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > >> > Java Persistence with Hibernate, Second Edition
> > > >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > >> linkCode=as2&tag=garygregory-20&linkId=
> cadb800f39946ec62ea2b1af9fe6a2
> > > b8>
> > > >> >
> > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > garygregory-20&l=am2&o=1&a=
> > > >> 1617290459>
> > > >> > JUnit in Action, Second Edition
> > > >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > >> linkCode=as2&tag=garygregory-20&linkId=
> 31ecd1f6b6d1eaf8886ac902a24de4
> > > 18%22
> > > >> >
> > > >> >
> > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > garygregory-20&l=am2&o=1&a=
> > > >> 1935182021>
> > > >> > Spring Batch in Action
> > > >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > garygregory-20&l=am2&o=1&a=
> > > >> 1935182951>
> > > >> > Blog: http://garygregory.wordpress.com
> > > >> > Home: http://garygregory.com/
> > > >> > Tweet! http://twitter.com/GaryGregory
> > > >>
> > > >> ------------------------------------------------------------
> ---------
> > > >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > >> For additional commands, e-mail: dev-help@commons.apache.org
> > > >>
> > > >>
> > > >
> > > >
> > > > --
> > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > Java Persistence with Hibernate, Second Edition
> > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
> b8>
> > > >
> > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> > > 1617290459>
> > > > JUnit in Action, Second Edition
> > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> > 18%22
> > > >
> > > >
> > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> > > 1935182021>
> > > > Spring Batch in Action
> > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> > > 1935182951>
> > > > Blog: http://garygregory.wordpress.com
> > > > Home: http://garygregory.com/
> > > > Tweet! http://twitter.com/GaryGregory
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > For additional commands, e-mail: dev-help@commons.apache.org
> > >
> > >
> >
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>

Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
Also note that the JCIP code uses its own package AND declares the
annotations with the RUNTIME retention policy.

Gary

On Nov 27, 2016 6:39 PM, "Matt Sicker" <bo...@gmail.com> wrote:

> If you're going to share the annotations between projects, why not use a
> JSR package for it like the google one? I thought the idea of embedding the
> annotations in [lang] was to prevent the need for the dependency and to use
> it internally, not as a public annotation for other projects to use.
>
> On 27 November 2016 at 19:55, Gary Gregory <ga...@gmail.com> wrote:
>
> > Are you suggesting [lang] becomes a multi-module project?
> >
> > Gary
> >
> > On Nov 27, 2016 5:01 PM, "sebb" <se...@gmail.com> wrote:
> >
> > > On 28 November 2016 at 00:11, Gary Gregory <ga...@gmail.com>
> > wrote:
> > > > On Sun, Nov 27, 2016 at 4:09 PM, sebb <se...@gmail.com> wrote:
> > > >
> > > >> On 27 November 2016 at 23:51, Gary Gregory <ga...@gmail.com>
> > > wrote:
> > > >> > On Sun, Nov 27, 2016 at 3:41 PM, sebb <se...@gmail.com> wrote:
> > > >> >
> > > >> >> On 27 November 2016 at 22:31, Gary Gregory <
> garydgregory@gmail.com
> > >
> > > >> wrote:
> > > >> >> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <se...@gmail.com>
> wrote:
> > > >> >> >
> > > >> >> >> On 27 November 2016 at 22:03, Gary Gregory <
> > > garydgregory@gmail.com>
> > > >> >> wrote:
> > > >> >> >> > These annotations are the SAME as have been published all
> over
> > > the
> > > >> >> place,
> > > >> >> >> > so I do not think we need a PR for review. Reviewing the
> code
> > in
> > > >> the
> > > >> >> repo
> > > >> >> >> > should be enough, but I'm not sure _what_ there is to review
> > > >> really.
> > > >> >> I've
> > > >> >> >> > already posted a link to the sources (a pastebin link). I'll
> > > >> create a
> > > >> >> >> Jira
> > > >> >> >> > of course.
> > > >> >> >>
> > > >> >> >> There is one aspect that needs review: does the annotation
> > belong
> > > in
> > > >> >> LANG?
> > > >> >> >> If we want to use the annotation in other components, do they
> > > have to
> > > >> >> >> depend on LANG?
> > > >> >> >>
> > > >> >> >
> > > >> >> > No see below and previous messages.
> > > >> >> >
> > > >> >> >
> > > >> >> >> If not, do they all have their own copies?
> > > >> >> >>
> > > >> >> >
> > > >> >> > No.
> > > >> >> >
> > > >> >> >
> > > >> >> >>
> > > >> >> >> And what happens when LANG needs a non-BC release?
> > > >> >> >>
> > > >> >> >
> > > >> >> > What is the issue I am missing?
> > > >> >> >
> > > >> >>
> > > >> >> The package name for the annotation might need to change
> > > >> >> That would be a downstream nuisance.
> > > >> >>
> > > >> >
> > > >> > Hi All,
> > > >> >
> > > >> > How is that different than changing the package name for any of
> our
> > > other
> > > >> > lang types?
> > > >>
> > > >> It's not.
> > > >>
> > > >> > If you want move a package, you have to break BC and we have clear
> > > >> > guidelines for that task.
> > > >>
> > > >> But why should I have to change package imports for annotations just
> > > >> because they happen to be in LANG?
> > > >>
> > > >> Note that this could get confusing.
> > > >>
> > > >> Say XYZ component starts out only needing lang for the annotations.
> > > >> So they include LANG 3.x and code the annotations.
> > > >>
> > > >> Later they find they want LANG 4.x for runtime.
> > > >> They would then need to drop the LANG 3.x dependency, fix up all the
> > > >> annotation imports etc.
> > > >> Unnecessary work if the annotations were in a separate component.
> > > >>
> > > >> Also, any tool that wants to check the annotations will have to look
> > > >> for them in lots of packages.
> > > >>
> > > >> Whilst it can no doubt be made to work, it's going to cause problems
> > > later.
> > > >>
> > > >
> > > > To be on the playful side, this is what my mother calls "borrowing
> > > trouble"
> > > > ;-)
> > > >
> > > > We can future-trip ourselves in all sorts of troubles. Our
> imaginations
> > > > know no bounds!  :-)
> > >
> > > This is not an imaginary scenario.
> > >
> > > We know that LANG will have a non-BC release at some point.
> > > The plan is to allow non-LANG components to share the LANG annotations.
> > > We know that components which originally don't need LANG may end up
> > > needing LANG at run-time.
> > > Therefore the problem will occur.
> > >
> > > In this case, "look before you leap" is appropriate.
> > >
> > > > Gary
> > > >
> > > >
> > > >>
> > > >> > Since already have a package called org.apache.commons.lang3.
> > > concurrent,
> > > >> I
> > > >> > propose we place these annottaions in
> > > >> > org.apache.commons.lang3.concurrent.annotation.
> > > >> >
> > > >> >
> > > >> >> >>
> > > >> >> >> My expectation for such annotations is that they would be
> > > >> >> >> self-contained (or built-in to the languange, not LANG).
> > > >> >> >>
> > > >> >> >
> > > >> >> > It is _because_ they are NOT built-in the language or JRE that
> we
> > > are
> > > >> >> > proposing they belong in [lang].
> > > >> >> >
> > > >> >> > Since we are providing the annotation with CLASS retention only
> > > >> >> > (initially), there is no hard dependency on [lang] at runtime.
> > > >> >> >
> > > >> >> > Is there some subtlety we are missing?
> > > >> >>
> > > >> >> Yes, the compile-time dependency.
> > > >> >>
> > > >> >
> > > >> > No surprise, right? You can't use an annotation without compiling
> > the
> > > >> > source file.
> > > >> >
> > > >> >
> > > >> >> AFAIK it's not possible to have a Maven compile-only dependency;
> > > >> >> compile-time implies run-time.
> > > >> >>
> > > >> >
> > > >> > That's a tooling issue of course which should not invalidate the
> > > >> worthiness
> > > >> > of this feature.
> > > >> >
> > > >> > If I am a downstream user of Commons Lang's new annotations, I
> would
> > > >> need a
> > > >> > Maven scope that says "I need [lang] as a compile time only
> > > dependency" I
> > > >> > do not see such a scope on
> > > >> > https://maven.apache.org/guides/introduction/
> > > introduction-to-dependency-
> > > >> mechanism.html#Dependency_Scope
> > > >> >
> > > >> > Time for a Jira!
> > > >> >
> > > >> > I wonder what Gradle offers users in this dept.?
> > > >> >
> > > >> > Gary
> > > >> >
> > > >> >
> > > >> >>
> > > >> >> > Gary
> > > >> >> >
> > > >> >> >
> > > >> >> >> > Gary
> > > >> >> >> >
> > > >> >> >> > On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <
> > > >> britter@apache.org>
> > > >> >> >> wrote:
> > > >> >> >> >
> > > >> >> >> >> Hi,
> > > >> >> >> >>
> > > >> >> >> >> Gary Gregory <ga...@gmail.com> schrieb am So., 27.
> > Nov.
> > > >> 2016
> > > >> >> um
> > > >> >> >> >> 21:01 Uhr:
> > > >> >> >> >>
> > > >> >> >> >> > So let's start with the CLASS retention annotations
> first.
> > > I'll
> > > >> >> commit
> > > >> >> >> >> > later today.
> > > >> >> >> >> >
> > > >> >> >> >>
> > > >> >> >> >> Maybe create a GitHub PR so people can have a look before
> it
> > > goes
> > > >> to
> > > >> >> >> >> master?
> > > >> >> >> >>
> > > >> >> >> >> Benedikt
> > > >> >> >> >>
> > > >> >> >> >>
> > > >> >> >> >> >
> > > >> >> >> >> > Gary
> > > >> >> >> >> >
> > > >> >> >> >> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <boards@gmail.com
> >
> > > >> wrote:
> > > >> >> >> >> >
> > > >> >> >> >> > > I feel like documenting thread safety in such a low
> > level,
> > > >> widely
> > > >> >> >> used
> > > >> >> >> >> > > library like [lang] is a great idea. Whether it uses
> > > >> annotations,
> > > >> >> >> >> > javadocs,
> > > >> >> >> >> > > or some sort of informal javadoc comments isn't too
> big a
> > > >> deal to
> > > >> >> >> me,
> > > >> >> >> >> but
> > > >> >> >> >> > > providing some guarantees of thread safety or lack
> > thereof
> > > >> would
> > > >> >> be
> > > >> >> >> >> > > invaluable information.
> > > >> >> >> >> > >
> > > >> >> >> >> > > On 27 November 2016 at 07:11, Benedikt Ritter <
> > > >> >> britter@apache.org>
> > > >> >> >> >> > wrote:
> > > >> >> >> >> > >
> > > >> >> >> >> > > > I thought we decided to abstain from documenting
> thread
> > > >> safety
> > > >> >> >> since
> > > >> >> >> >> it
> > > >> >> >> >> > > > would get outdated quickly anyway.
> > > >> >> >> >> > > >
> > > >> >> >> >> > > > Gary Gregory <ga...@gmail.com> schrieb am
> So.,
> > > 27.
> > > >> Nov.
> > > >> >> >> 2016
> > > >> >> >> >> um
> > > >> >> >> >> > > > 09:11 Uhr:
> > > >> >> >> >> > > >
> > > >> >> >> >> > > > > But if we then want a runtime version we had an odd
> > > >> packaging
> > > >> >> >> with
> > > >> >> >> >> > > CLASS
> > > >> >> >> >> > > > > retention in .concurrent. and RUNTIME in
> > > >> .concurrent.runtime.
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > > I might be in YAGNI territory here...
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > > Gary
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <
> > > >> >> boards@gmail.com
> > > >> >> >> >
> > > >> >> >> >> > > wrote:
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > > > I think adding the additional clazz/runtime
> package
> > > >> would
> > > >> >> be a
> > > >> >> >> >> > little
> > > >> >> >> >> > > > > > overkill if you only include one packaging option
> > for
> > > >> now.
> > > >> >> >> >> > > > > >
> > > >> >> >> >> > > > > > On 27 November 2016 at 00:04, Gary Gregory <
> > > >> >> >> >> garydgregory@gmail.com
> > > >> >> >> >> > >
> > > >> >> >> >> > > > > wrote:
> > > >> >> >> >> > > > > >
> > > >> >> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <
> > > >> boards@gmail.com
> > > >> >> >
> > > >> >> >> >> wrote:
> > > >> >> >> >> > > > > > > >
> > > >> >> >> >> > > > > > > > I can think of a couple use cases for runtime
> > > >> retention
> > > >> >> >> for
> > > >> >> >> >> > > thread
> > > >> >> >> >> > > > > > safety
> > > >> >> >> >> > > > > > > > annotations, but they're not specific to
> > commons
> > > >> lang.
> > > >> >> >> >> > > > > > > >
> > > >> >> >> >> > > > > > > > 1. A framework could choose what type of data
> > > >> >> structure or
> > > >> >> >> >> > > > algorithm
> > > >> >> >> >> > > > > to
> > > >> >> >> >> > > > > > > use
> > > >> >> >> >> > > > > > > > at runtime based on the presence of which
> > thread
> > > >> safety
> > > >> >> >> >> > > annotation
> > > >> >> >> >> > > > is
> > > >> >> >> >> > > > > > on.
> > > >> >> >> >> > > > > > > > Same for mutability.
> > > >> >> >> >> > > > > > > > 2. A testing framework could use these
> > > annotations
> > > >> to
> > > >> >> try
> > > >> >> >> and
> > > >> >> >> >> > > > > automate
> > > >> >> >> >> > > > > > > some
> > > >> >> >> >> > > > > > > > sort of thread safety tests, though that
> sounds
> > > >> like a
> > > >> >> >> hard
> > > >> >> >> >> > > problem
> > > >> >> >> >> > > > > to
> > > >> >> >> >> > > > > > > > actually implement.
> > > >> >> >> >> > > > > > > >
> > > >> >> >> >> > > > > > > > However, it'd be easier to just start with
> > class
> > > >> >> retention
> > > >> >> >> >> (or
> > > >> >> >> >> > > > source
> > > >> >> >> >> > > > > > > > retention) just for documentation purposes.
> > > Higher
> > > >> >> >> retention
> > > >> >> >> >> > > levels
> > > >> >> >> >> > > > > > could
> > > >> >> >> >> > > > > > > > be added later if an important use case came
> > up.
> > > >> >> >> >> > > > > > >
> > > >> >> >> >> > > > > > > But which packaging option?
> > > >> >> >> >> > > > > > >
> > > >> >> >> >> > > > > > > Gary
> > > >> >> >> >> > > > > > > >
> > > >> >> >> >> > > > > > > > On 26 November 2016 at 19:56, Gary Gregory <
> > > >> >> >> >> > > garydgregory@gmail.com
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > > > > wrote:
> > > >> >> >> >> > > > > > > >
> > > >> >> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <
> > > >> >> sebbaz@gmail.com
> > > >> >> >> >
> > > >> >> >> >> > > wrote:
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary
> Gregory
> > <
> > > >> >> >> >> > > > > garydgregory@gmail.com
> > > >> >> >> >> > > > > > >
> > > >> >> >> >> > > > > > > > > wrote:
> > > >> >> >> >> > > > > > > > > > > On a [crypto] thread, I mentioned
> > > >> >> >> >> > > > http://pastebin.com/RKPGGdJ9
> > > >> >> >> >> > > > > > to
> > > >> >> >> >> > > > > > > add
> > > >> >> >> >> > > > > > > > > > the
> > > >> >> >> >> > > > > > > > > > > "classic" four
> > javax.annotation.concurrent
> > > >> >> >> annotations
> > > >> >> >> >> to
> > > >> >> >> >> > > two
> > > >> >> >> >> > > > > > > packages
> > > >> >> >> >> > > > > > > > > > > (.clazz and .runtime) in Commons Lang
> for
> > > >> CLASS
> > > >> >> and
> > > >> >> >> >> > RUNTIME
> > > >> >> >> >> > > > > > > retentions.
> > > >> >> >> >> > > > > > > > > > >
> > > >> >> >> >> > > > > > > > > > > You'd use the CLASS version to avoid a
> > hard
> > > >> >> >> dependency
> > > >> >> >> >> on
> > > >> >> >> >> > > > > [lang].
> > > >> >> >> >> > > > > > > > > RUNTIME
> > > >> >> >> >> > > > > > > > > > > to keep them around.
> > > >> >> >> >> > > > > > > > > > >
> > > >> >> >> >> > > > > > > > > > > We'd use the CLASS versions in all of
> > > Commons
> > > >> for
> > > >> >> >> >> > > documenting
> > > >> >> >> >> > > > > > > thread
> > > >> >> >> >> > > > > > > > > > safety.
> > > >> >> >> >> > > > > > > > > > >
> > > >> >> >> >> > > > > > > > > > > Thoughts?
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > > > > > > > > > Definitely Class retention, not Runtime.
> > > >> >> >> >> > > > > > > > > > You don't want to have to include the
> > > annotation
> > > >> >> jar
> > > >> >> >> on
> > > >> >> >> >> the
> > > >> >> >> >> > > > > runtime
> > > >> >> >> >> > > > > > > > > > classpath.
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > Hi Sebb,
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > Right now I have both of these packages:
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> > > >> >> annotation.concurrent.clazz
> > > >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> > > >> >> >> annotation.concurrent.runtime
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > Each with a copy of:
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > GuardedBy
> > > >> >> >> >> > > > > > > > > Immutable
> > > >> >> >> >> > > > > > > > > NotThreadSafe
> > > >> >> >> >> > > > > > > > > ThreadSafe
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > Should we include what I have as is?
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > If we were to only provide the annotation
> at
> > > the
> > > >> >> CLASS
> > > >> >> >> >> > > retention
> > > >> >> >> >> > > > > > level,
> > > >> >> >> >> > > > > > > > > should we still package them in
> > > >> >> >> >> > ...annotation.concurrent.clazz
> > > >> >> >> >> > > in
> > > >> >> >> >> > > > > > case
> > > >> >> >> >> > > > > > > we
> > > >> >> >> >> > > > > > > > > want to provide
> annotation.concurrent.runtime
> > > >> later?
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > If we know for certain we never want to
> > provide
> > > >> >> RUNTIME
> > > >> >> >> >> > > > retention,
> > > >> >> >> >> > > > > we
> > > >> >> >> >> > > > > > > can
> > > >> >> >> >> > > > > > > > > put them all in annotation.concurrent now.
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > Thoughts?
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > Gary
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > > [I don't know why the annotations were
> ever
> > > >> >> considered
> > > >> >> >> >> > > suitable
> > > >> >> >> >> > > > > for
> > > >> >> >> >> > > > > > > > > > runtime]
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > > > > > > > > > > Gary
> > > >> >> >> >> > > > > > > > > > >
> > > >> >> >> >> > > > > > > > > > > --
> > > >> >> >> >> > > > > > > > > > > E-Mail: garydgregory@gmail.com |
> > > >> >> >> ggregory@apache.org
> > > >> >> >> >> > > > > > > > > > > Java Persistence with Hibernate, Second
> > > >> Edition
> > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > >> >> >> >> product/1617290459/ref=as_li_
> > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > >> >> >> >> 9325&creativeASIN=1617290459&
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > > > > > >
> > > >> >> >> >> > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2
> > > >> >> >> >> > > b8>
> > > >> >> >> >> > > > > > > > > > >
> > > >> >> >> >> > > > > > > > > > > <http:////
> > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > >> >> >> a=
> > > >> >> >> >> > > > > > > > > > 1617290459>
> > > >> >> >> >> > > > > > > > > > > JUnit in Action, Second Edition
> > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > >> >> >> >> product/1935182021/ref=as_li_
> > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > >> >> >> >> 9325&creativeASIN=1935182021&
> > > >> >> >> >> > > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > >> >> >> >> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > >> >> >> >> > > > > > > > > 18%22
> > > >> >> >> >> > > > > > > > > > >
> > > >> >> >> >> > > > > > > > > > >
> > > >> >> >> >> > > > > > > > > > > <http:////
> > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > >> >> >> a=
> > > >> >> >> >> > > > > > > > > > 1935182021>
> > > >> >> >> >> > > > > > > > > > > Spring Batch in Action
> > > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > > >> >> >> >> product/1935182951/ref=as_li_
> > > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > >> >> >> >> 9325&creativeASIN=1935182951&
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > linkCode=%7B%7BlinkCode%7D%7D&
> > tag=garygregory-20&linkId=%7B%
> > > >> >> >> >> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+
> > Batch+in+Action>
> > > >> >> >> >> > > > > > > > > > > <http:////
> > > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > > >> >> ir?t=garygregory-20&l=am2&o=1&
> > > >> >> >> a=
> > > >> >> >> >> > > > > > > > > > 1935182951>
> > > >> >> >> >> > > > > > > > > > > Blog: http://garygregory.wordpress.com
> > > >> >> >> >> > > > > > > > > > > Home: http://garygregory.com/
> > > >> >> >> >> > > > > > > > > > > Tweet! http://twitter.com/GaryGregory
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > ------------------------------
> > ------------------------------
> > > >> >> >> >> > > > > > > ---------
> > > >> >> >> >> > > > > > > > > > To unsubscribe, e-mail:
> > > dev-unsubscribe@commons.
> > > >> >> >> >> apache.org
> > > >> >> >> >> > > > > > > > > > For additional commands, e-mail:
> > > >> >> >> >> > dev-help@commons.apache.org
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > --
> > > >> >> >> >> > > > > > > > > E-Mail: garydgregory@gmail.com |
> > > >> ggregory@apache.org
> > > >> >> >> >> > > > > > > > > Java Persistence with Hibernate, Second
> > Edition
> > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > >> >> >> product/1617290459/ref=as_li_
> > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > >> >> >> >> 9325&creativeASIN=1617290459&
> > > >> >> >> >> > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > >> >> >> >> > > > > > cadb800f39946ec62ea2b1af9fe6a2
> > > >> >> >> >> > > > > > > b8>
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> adsystem.com/e/ir?t=
> > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > >> >> >> >> > > > > > > > > 1617290459>
> > > >> >> >> >> > > > > > > > > JUnit in Action, Second Edition
> > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > >> >> >> product/1935182021/ref=as_li_
> > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > >> >> >> >> 9325&creativeASIN=1935182021&
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > >> >> >> >> > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > >> >> >> >> > > > > > 18%22
> > > >> >> >> >> > > > > > > > > >
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> adsystem.com/e/ir?t=
> > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > >> >> >> >> > > > > > > > > 1935182021>
> > > >> >> >> >> > > > > > > > > Spring Batch in Action
> > > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > > >> >> >> product/1935182951/ref=as_li_
> > > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > > >> >> >> >> 9325&creativeASIN=1935182951&
> > > >> >> >> >> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
> > > >> >> >> >> tag=garygregory-20&linkId=%7B%
> > > >> >> >> >> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+
> Batch+in+Action>
> > > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-
> adsystem.com/e/ir?t=
> > > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > > >> >> >> >> > > > > > > > > 1935182951>
> > > >> >> >> >> > > > > > > > > Blog: http://garygregory.wordpress.com
> > > >> >> >> >> > > > > > > > > Home: http://garygregory.com/
> > > >> >> >> >> > > > > > > > > Tweet! http://twitter.com/GaryGregory
> > > >> >> >> >> > > > > > > > >
> > > >> >> >> >> > > > > > > >
> > > >> >> >> >> > > > > > > >
> > > >> >> >> >> > > > > > > >
> > > >> >> >> >> > > > > > > > --
> > > >> >> >> >> > > > > > > > Matt Sicker <bo...@gmail.com>
> > > >> >> >> >> > > > > > >
> > > >> >> >> >> > > > > >
> > > >> >> >> >> > > > > >
> > > >> >> >> >> > > > > >
> > > >> >> >> >> > > > > > --
> > > >> >> >> >> > > > > > Matt Sicker <bo...@gmail.com>
> > > >> >> >> >> > > > > >
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > > --
> > > >> >> >> >> > > > > E-Mail: garydgregory@gmail.com |
> ggregory@apache.org
> > > >> >> >> >> > > > > Java Persistence with Hibernate, Second Edition
> > > >> >> >> >> > > > > <
> > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > product/1617290459/ref=as_li_
> > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > 9325&creativeASIN=1617290459&
> > > >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> > > >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2b8
> > > >> >> >> >> > > > > >
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > > <http:////
> > > >> >> >> >> > > > >
> > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> ir?t=garygregory-20&l=am2&o=1&
> > > >> >> >> a=1617290459
> > > >> >> >> >> > > >
> > > >> >> >> >> > > > > JUnit in Action, Second Edition
> > > >> >> >> >> > > > > <
> > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > product/1935182021/ref=as_li_
> > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > 9325&creativeASIN=1935182021&
> > > >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> > > >> >> >> >> 31ecd1f6b6d1eaf8886ac902a24de4
> > > >> >> >> >> > > 18%22
> > > >> >> >> >> > > > > >
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > > > <http:////
> > > >> >> >> >> > > > >
> > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> ir?t=garygregory-20&l=am2&o=1&
> > > >> >> >> a=1935182021
> > > >> >> >> >> > > >
> > > >> >> >> >> > > > > Spring Batch in Action
> > > >> >> >> >> > > > > <
> > > >> >> >> >> > > > > https://www.amazon.com/gp/
> > > product/1935182951/ref=as_li_
> > > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > > 9325&creativeASIN=1935182951&
> > > >> >> >> >> > > > linkCode=%7B%7BlinkCode%7D%7D&
> > > >> tag=garygregory-20&linkId=%7B%
> > > >> >> >> >> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> > > >> >> >> >> > > > > >
> > > >> >> >> >> > > > > <http:////
> > > >> >> >> >> > > > >
> > > >> >> >> >> > ir-na.amazon-adsystem.com/e/
> ir?t=garygregory-20&l=am2&o=1&
> > > >> >> >> a=1935182951
> > > >> >> >> >> > > >
> > > >> >> >> >> > > > > Blog: http://garygregory.wordpress.com
> > > >> >> >> >> > > > > Home: http://garygregory.com/
> > > >> >> >> >> > > > > Tweet! http://twitter.com/GaryGregory
> > > >> >> >> >> > > > >
> > > >> >> >> >> > > >
> > > >> >> >> >> > >
> > > >> >> >> >> > >
> > > >> >> >> >> > >
> > > >> >> >> >> > > --
> > > >> >> >> >> > > Matt Sicker <bo...@gmail.com>
> > > >> >> >> >> > >
> > > >> >> >> >> >
> > > >> >> >> >>
> > > >> >> >> >
> > > >> >> >> >
> > > >> >> >> >
> > > >> >> >> > --
> > > >> >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > >> >> >> > Java Persistence with Hibernate, Second Edition
> > > >> >> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > >> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > >> >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > >> cadb800f39946ec62ea2b1af9fe6a2
> > > >> >> b8>
> > > >> >> >> >
> > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > >> >> garygregory-20&l=am2&o=1&a=
> > > >> >> >> 1617290459>
> > > >> >> >> > JUnit in Action, Second Edition
> > > >> >> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > >> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > >> >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > >> 31ecd1f6b6d1eaf8886ac902a24de4
> > > >> >> 18%22
> > > >> >> >> >
> > > >> >> >> >
> > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > >> >> garygregory-20&l=am2&o=1&a=
> > > >> >> >> 1935182021>
> > > >> >> >> > Spring Batch in Action
> > > >> >> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > >> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > >> >> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > >> >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > >> >> garygregory-20&l=am2&o=1&a=
> > > >> >> >> 1935182951>
> > > >> >> >> > Blog: http://garygregory.wordpress.com
> > > >> >> >> > Home: http://garygregory.com/
> > > >> >> >> > Tweet! http://twitter.com/GaryGregory
> > > >> >> >>
> > > >> >> >> ------------------------------------------------------------
> > > >> ---------
> > > >> >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > >> >> >> For additional commands, e-mail: dev-help@commons.apache.org
> > > >> >> >>
> > > >> >> >>
> > > >> >> >
> > > >> >> >
> > > >> >> > --
> > > >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > >> >> > Java Persistence with Hibernate, Second Edition
> > > >> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > cadb800f39946ec62ea2b1af9fe6a2
> > > >> b8>
> > > >> >> >
> > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > >> garygregory-20&l=am2&o=1&a=
> > > >> >> 1617290459>
> > > >> >> > JUnit in Action, Second Edition
> > > >> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > >> >> linkCode=as2&tag=garygregory-20&linkId=
> > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > >> 18%22
> > > >> >> >
> > > >> >> >
> > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > >> garygregory-20&l=am2&o=1&a=
> > > >> >> 1935182021>
> > > >> >> > Spring Batch in Action
> > > >> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > >> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > >> garygregory-20&l=am2&o=1&a=
> > > >> >> 1935182951>
> > > >> >> > Blog: http://garygregory.wordpress.com
> > > >> >> > Home: http://garygregory.com/
> > > >> >> > Tweet! http://twitter.com/GaryGregory
> > > >> >>
> > > >> >> ------------------------------------------------------------
> > > ---------
> > > >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > >> >> For additional commands, e-mail: dev-help@commons.apache.org
> > > >> >>
> > > >> >>
> > > >> >
> > > >> >
> > > >> > --
> > > >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > >> > Java Persistence with Hibernate, Second Edition
> > > >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > >> linkCode=as2&tag=garygregory-20&linkId=
> cadb800f39946ec62ea2b1af9fe6a2
> > > b8>
> > > >> >
> > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > garygregory-20&l=am2&o=1&a=
> > > >> 1617290459>
> > > >> > JUnit in Action, Second Edition
> > > >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > >> linkCode=as2&tag=garygregory-20&linkId=
> 31ecd1f6b6d1eaf8886ac902a24de4
> > > 18%22
> > > >> >
> > > >> >
> > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > garygregory-20&l=am2&o=1&a=
> > > >> 1935182021>
> > > >> > Spring Batch in Action
> > > >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > garygregory-20&l=am2&o=1&a=
> > > >> 1935182951>
> > > >> > Blog: http://garygregory.wordpress.com
> > > >> > Home: http://garygregory.com/
> > > >> > Tweet! http://twitter.com/GaryGregory
> > > >>
> > > >> ------------------------------------------------------------
> ---------
> > > >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > >> For additional commands, e-mail: dev-help@commons.apache.org
> > > >>
> > > >>
> > > >
> > > >
> > > > --
> > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > Java Persistence with Hibernate, Second Edition
> > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
> b8>
> > > >
> > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> > > 1617290459>
> > > > JUnit in Action, Second Edition
> > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> > 18%22
> > > >
> > > >
> > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> > > 1935182021>
> > > > Spring Batch in Action
> > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> > > 1935182951>
> > > > Blog: http://garygregory.wordpress.com
> > > > Home: http://garygregory.com/
> > > > Tweet! http://twitter.com/GaryGregory
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > For additional commands, e-mail: dev-help@commons.apache.org
> > >
> > >
> >
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>

Re: [lang] Thread safety annotations

Posted by Matt Sicker <bo...@gmail.com>.
If you're going to share the annotations between projects, why not use a
JSR package for it like the google one? I thought the idea of embedding the
annotations in [lang] was to prevent the need for the dependency and to use
it internally, not as a public annotation for other projects to use.

On 27 November 2016 at 19:55, Gary Gregory <ga...@gmail.com> wrote:

> Are you suggesting [lang] becomes a multi-module project?
>
> Gary
>
> On Nov 27, 2016 5:01 PM, "sebb" <se...@gmail.com> wrote:
>
> > On 28 November 2016 at 00:11, Gary Gregory <ga...@gmail.com>
> wrote:
> > > On Sun, Nov 27, 2016 at 4:09 PM, sebb <se...@gmail.com> wrote:
> > >
> > >> On 27 November 2016 at 23:51, Gary Gregory <ga...@gmail.com>
> > wrote:
> > >> > On Sun, Nov 27, 2016 at 3:41 PM, sebb <se...@gmail.com> wrote:
> > >> >
> > >> >> On 27 November 2016 at 22:31, Gary Gregory <garydgregory@gmail.com
> >
> > >> wrote:
> > >> >> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <se...@gmail.com> wrote:
> > >> >> >
> > >> >> >> On 27 November 2016 at 22:03, Gary Gregory <
> > garydgregory@gmail.com>
> > >> >> wrote:
> > >> >> >> > These annotations are the SAME as have been published all over
> > the
> > >> >> place,
> > >> >> >> > so I do not think we need a PR for review. Reviewing the code
> in
> > >> the
> > >> >> repo
> > >> >> >> > should be enough, but I'm not sure _what_ there is to review
> > >> really.
> > >> >> I've
> > >> >> >> > already posted a link to the sources (a pastebin link). I'll
> > >> create a
> > >> >> >> Jira
> > >> >> >> > of course.
> > >> >> >>
> > >> >> >> There is one aspect that needs review: does the annotation
> belong
> > in
> > >> >> LANG?
> > >> >> >> If we want to use the annotation in other components, do they
> > have to
> > >> >> >> depend on LANG?
> > >> >> >>
> > >> >> >
> > >> >> > No see below and previous messages.
> > >> >> >
> > >> >> >
> > >> >> >> If not, do they all have their own copies?
> > >> >> >>
> > >> >> >
> > >> >> > No.
> > >> >> >
> > >> >> >
> > >> >> >>
> > >> >> >> And what happens when LANG needs a non-BC release?
> > >> >> >>
> > >> >> >
> > >> >> > What is the issue I am missing?
> > >> >> >
> > >> >>
> > >> >> The package name for the annotation might need to change
> > >> >> That would be a downstream nuisance.
> > >> >>
> > >> >
> > >> > Hi All,
> > >> >
> > >> > How is that different than changing the package name for any of our
> > other
> > >> > lang types?
> > >>
> > >> It's not.
> > >>
> > >> > If you want move a package, you have to break BC and we have clear
> > >> > guidelines for that task.
> > >>
> > >> But why should I have to change package imports for annotations just
> > >> because they happen to be in LANG?
> > >>
> > >> Note that this could get confusing.
> > >>
> > >> Say XYZ component starts out only needing lang for the annotations.
> > >> So they include LANG 3.x and code the annotations.
> > >>
> > >> Later they find they want LANG 4.x for runtime.
> > >> They would then need to drop the LANG 3.x dependency, fix up all the
> > >> annotation imports etc.
> > >> Unnecessary work if the annotations were in a separate component.
> > >>
> > >> Also, any tool that wants to check the annotations will have to look
> > >> for them in lots of packages.
> > >>
> > >> Whilst it can no doubt be made to work, it's going to cause problems
> > later.
> > >>
> > >
> > > To be on the playful side, this is what my mother calls "borrowing
> > trouble"
> > > ;-)
> > >
> > > We can future-trip ourselves in all sorts of troubles. Our imaginations
> > > know no bounds!  :-)
> >
> > This is not an imaginary scenario.
> >
> > We know that LANG will have a non-BC release at some point.
> > The plan is to allow non-LANG components to share the LANG annotations.
> > We know that components which originally don't need LANG may end up
> > needing LANG at run-time.
> > Therefore the problem will occur.
> >
> > In this case, "look before you leap" is appropriate.
> >
> > > Gary
> > >
> > >
> > >>
> > >> > Since already have a package called org.apache.commons.lang3.
> > concurrent,
> > >> I
> > >> > propose we place these annottaions in
> > >> > org.apache.commons.lang3.concurrent.annotation.
> > >> >
> > >> >
> > >> >> >>
> > >> >> >> My expectation for such annotations is that they would be
> > >> >> >> self-contained (or built-in to the languange, not LANG).
> > >> >> >>
> > >> >> >
> > >> >> > It is _because_ they are NOT built-in the language or JRE that we
> > are
> > >> >> > proposing they belong in [lang].
> > >> >> >
> > >> >> > Since we are providing the annotation with CLASS retention only
> > >> >> > (initially), there is no hard dependency on [lang] at runtime.
> > >> >> >
> > >> >> > Is there some subtlety we are missing?
> > >> >>
> > >> >> Yes, the compile-time dependency.
> > >> >>
> > >> >
> > >> > No surprise, right? You can't use an annotation without compiling
> the
> > >> > source file.
> > >> >
> > >> >
> > >> >> AFAIK it's not possible to have a Maven compile-only dependency;
> > >> >> compile-time implies run-time.
> > >> >>
> > >> >
> > >> > That's a tooling issue of course which should not invalidate the
> > >> worthiness
> > >> > of this feature.
> > >> >
> > >> > If I am a downstream user of Commons Lang's new annotations, I would
> > >> need a
> > >> > Maven scope that says "I need [lang] as a compile time only
> > dependency" I
> > >> > do not see such a scope on
> > >> > https://maven.apache.org/guides/introduction/
> > introduction-to-dependency-
> > >> mechanism.html#Dependency_Scope
> > >> >
> > >> > Time for a Jira!
> > >> >
> > >> > I wonder what Gradle offers users in this dept.?
> > >> >
> > >> > Gary
> > >> >
> > >> >
> > >> >>
> > >> >> > Gary
> > >> >> >
> > >> >> >
> > >> >> >> > Gary
> > >> >> >> >
> > >> >> >> > On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <
> > >> britter@apache.org>
> > >> >> >> wrote:
> > >> >> >> >
> > >> >> >> >> Hi,
> > >> >> >> >>
> > >> >> >> >> Gary Gregory <ga...@gmail.com> schrieb am So., 27.
> Nov.
> > >> 2016
> > >> >> um
> > >> >> >> >> 21:01 Uhr:
> > >> >> >> >>
> > >> >> >> >> > So let's start with the CLASS retention annotations first.
> > I'll
> > >> >> commit
> > >> >> >> >> > later today.
> > >> >> >> >> >
> > >> >> >> >>
> > >> >> >> >> Maybe create a GitHub PR so people can have a look before it
> > goes
> > >> to
> > >> >> >> >> master?
> > >> >> >> >>
> > >> >> >> >> Benedikt
> > >> >> >> >>
> > >> >> >> >>
> > >> >> >> >> >
> > >> >> >> >> > Gary
> > >> >> >> >> >
> > >> >> >> >> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <bo...@gmail.com>
> > >> wrote:
> > >> >> >> >> >
> > >> >> >> >> > > I feel like documenting thread safety in such a low
> level,
> > >> widely
> > >> >> >> used
> > >> >> >> >> > > library like [lang] is a great idea. Whether it uses
> > >> annotations,
> > >> >> >> >> > javadocs,
> > >> >> >> >> > > or some sort of informal javadoc comments isn't too big a
> > >> deal to
> > >> >> >> me,
> > >> >> >> >> but
> > >> >> >> >> > > providing some guarantees of thread safety or lack
> thereof
> > >> would
> > >> >> be
> > >> >> >> >> > > invaluable information.
> > >> >> >> >> > >
> > >> >> >> >> > > On 27 November 2016 at 07:11, Benedikt Ritter <
> > >> >> britter@apache.org>
> > >> >> >> >> > wrote:
> > >> >> >> >> > >
> > >> >> >> >> > > > I thought we decided to abstain from documenting thread
> > >> safety
> > >> >> >> since
> > >> >> >> >> it
> > >> >> >> >> > > > would get outdated quickly anyway.
> > >> >> >> >> > > >
> > >> >> >> >> > > > Gary Gregory <ga...@gmail.com> schrieb am So.,
> > 27.
> > >> Nov.
> > >> >> >> 2016
> > >> >> >> >> um
> > >> >> >> >> > > > 09:11 Uhr:
> > >> >> >> >> > > >
> > >> >> >> >> > > > > But if we then want a runtime version we had an odd
> > >> packaging
> > >> >> >> with
> > >> >> >> >> > > CLASS
> > >> >> >> >> > > > > retention in .concurrent. and RUNTIME in
> > >> .concurrent.runtime.
> > >> >> >> >> > > > >
> > >> >> >> >> > > > > I might be in YAGNI territory here...
> > >> >> >> >> > > > >
> > >> >> >> >> > > > > Gary
> > >> >> >> >> > > > >
> > >> >> >> >> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <
> > >> >> boards@gmail.com
> > >> >> >> >
> > >> >> >> >> > > wrote:
> > >> >> >> >> > > > >
> > >> >> >> >> > > > > > I think adding the additional clazz/runtime package
> > >> would
> > >> >> be a
> > >> >> >> >> > little
> > >> >> >> >> > > > > > overkill if you only include one packaging option
> for
> > >> now.
> > >> >> >> >> > > > > >
> > >> >> >> >> > > > > > On 27 November 2016 at 00:04, Gary Gregory <
> > >> >> >> >> garydgregory@gmail.com
> > >> >> >> >> > >
> > >> >> >> >> > > > > wrote:
> > >> >> >> >> > > > > >
> > >> >> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <
> > >> boards@gmail.com
> > >> >> >
> > >> >> >> >> wrote:
> > >> >> >> >> > > > > > > >
> > >> >> >> >> > > > > > > > I can think of a couple use cases for runtime
> > >> retention
> > >> >> >> for
> > >> >> >> >> > > thread
> > >> >> >> >> > > > > > safety
> > >> >> >> >> > > > > > > > annotations, but they're not specific to
> commons
> > >> lang.
> > >> >> >> >> > > > > > > >
> > >> >> >> >> > > > > > > > 1. A framework could choose what type of data
> > >> >> structure or
> > >> >> >> >> > > > algorithm
> > >> >> >> >> > > > > to
> > >> >> >> >> > > > > > > use
> > >> >> >> >> > > > > > > > at runtime based on the presence of which
> thread
> > >> safety
> > >> >> >> >> > > annotation
> > >> >> >> >> > > > is
> > >> >> >> >> > > > > > on.
> > >> >> >> >> > > > > > > > Same for mutability.
> > >> >> >> >> > > > > > > > 2. A testing framework could use these
> > annotations
> > >> to
> > >> >> try
> > >> >> >> and
> > >> >> >> >> > > > > automate
> > >> >> >> >> > > > > > > some
> > >> >> >> >> > > > > > > > sort of thread safety tests, though that sounds
> > >> like a
> > >> >> >> hard
> > >> >> >> >> > > problem
> > >> >> >> >> > > > > to
> > >> >> >> >> > > > > > > > actually implement.
> > >> >> >> >> > > > > > > >
> > >> >> >> >> > > > > > > > However, it'd be easier to just start with
> class
> > >> >> retention
> > >> >> >> >> (or
> > >> >> >> >> > > > source
> > >> >> >> >> > > > > > > > retention) just for documentation purposes.
> > Higher
> > >> >> >> retention
> > >> >> >> >> > > levels
> > >> >> >> >> > > > > > could
> > >> >> >> >> > > > > > > > be added later if an important use case came
> up.
> > >> >> >> >> > > > > > >
> > >> >> >> >> > > > > > > But which packaging option?
> > >> >> >> >> > > > > > >
> > >> >> >> >> > > > > > > Gary
> > >> >> >> >> > > > > > > >
> > >> >> >> >> > > > > > > > On 26 November 2016 at 19:56, Gary Gregory <
> > >> >> >> >> > > garydgregory@gmail.com
> > >> >> >> >> > > > >
> > >> >> >> >> > > > > > > wrote:
> > >> >> >> >> > > > > > > >
> > >> >> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <
> > >> >> sebbaz@gmail.com
> > >> >> >> >
> > >> >> >> >> > > wrote:
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory
> <
> > >> >> >> >> > > > > garydgregory@gmail.com
> > >> >> >> >> > > > > > >
> > >> >> >> >> > > > > > > > > wrote:
> > >> >> >> >> > > > > > > > > > > On a [crypto] thread, I mentioned
> > >> >> >> >> > > > http://pastebin.com/RKPGGdJ9
> > >> >> >> >> > > > > > to
> > >> >> >> >> > > > > > > add
> > >> >> >> >> > > > > > > > > > the
> > >> >> >> >> > > > > > > > > > > "classic" four
> javax.annotation.concurrent
> > >> >> >> annotations
> > >> >> >> >> to
> > >> >> >> >> > > two
> > >> >> >> >> > > > > > > packages
> > >> >> >> >> > > > > > > > > > > (.clazz and .runtime) in Commons Lang for
> > >> CLASS
> > >> >> and
> > >> >> >> >> > RUNTIME
> > >> >> >> >> > > > > > > retentions.
> > >> >> >> >> > > > > > > > > > >
> > >> >> >> >> > > > > > > > > > > You'd use the CLASS version to avoid a
> hard
> > >> >> >> dependency
> > >> >> >> >> on
> > >> >> >> >> > > > > [lang].
> > >> >> >> >> > > > > > > > > RUNTIME
> > >> >> >> >> > > > > > > > > > > to keep them around.
> > >> >> >> >> > > > > > > > > > >
> > >> >> >> >> > > > > > > > > > > We'd use the CLASS versions in all of
> > Commons
> > >> for
> > >> >> >> >> > > documenting
> > >> >> >> >> > > > > > > thread
> > >> >> >> >> > > > > > > > > > safety.
> > >> >> >> >> > > > > > > > > > >
> > >> >> >> >> > > > > > > > > > > Thoughts?
> > >> >> >> >> > > > > > > > > >
> > >> >> >> >> > > > > > > > > > Definitely Class retention, not Runtime.
> > >> >> >> >> > > > > > > > > > You don't want to have to include the
> > annotation
> > >> >> jar
> > >> >> >> on
> > >> >> >> >> the
> > >> >> >> >> > > > > runtime
> > >> >> >> >> > > > > > > > > > classpath.
> > >> >> >> >> > > > > > > > > >
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > > > Hi Sebb,
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > > > Right now I have both of these packages:
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> > >> >> annotation.concurrent.clazz
> > >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> > >> >> >> annotation.concurrent.runtime
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > > > Each with a copy of:
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > > > GuardedBy
> > >> >> >> >> > > > > > > > > Immutable
> > >> >> >> >> > > > > > > > > NotThreadSafe
> > >> >> >> >> > > > > > > > > ThreadSafe
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > > > Should we include what I have as is?
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > > > If we were to only provide the annotation at
> > the
> > >> >> CLASS
> > >> >> >> >> > > retention
> > >> >> >> >> > > > > > level,
> > >> >> >> >> > > > > > > > > should we still package them in
> > >> >> >> >> > ...annotation.concurrent.clazz
> > >> >> >> >> > > in
> > >> >> >> >> > > > > > case
> > >> >> >> >> > > > > > > we
> > >> >> >> >> > > > > > > > > want to provide annotation.concurrent.runtime
> > >> later?
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > > > If we know for certain we never want to
> provide
> > >> >> RUNTIME
> > >> >> >> >> > > > retention,
> > >> >> >> >> > > > > we
> > >> >> >> >> > > > > > > can
> > >> >> >> >> > > > > > > > > put them all in annotation.concurrent now.
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > > > Thoughts?
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > > > Gary
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > > > > [I don't know why the annotations were ever
> > >> >> considered
> > >> >> >> >> > > suitable
> > >> >> >> >> > > > > for
> > >> >> >> >> > > > > > > > > > runtime]
> > >> >> >> >> > > > > > > > > >
> > >> >> >> >> > > > > > > > > > > Gary
> > >> >> >> >> > > > > > > > > > >
> > >> >> >> >> > > > > > > > > > > --
> > >> >> >> >> > > > > > > > > > > E-Mail: garydgregory@gmail.com |
> > >> >> >> ggregory@apache.org
> > >> >> >> >> > > > > > > > > > > Java Persistence with Hibernate, Second
> > >> Edition
> > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > >> >> >> >> product/1617290459/ref=as_li_
> > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > >> >> >> >> 9325&creativeASIN=1617290459&
> > >> >> >> >> > > > > > > > > >
> > >> >> >> >> > > > > > >
> > >> >> >> >> > > > > linkCode=as2&tag=garygregory-20&linkId=
> > >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2
> > >> >> >> >> > > b8>
> > >> >> >> >> > > > > > > > > > >
> > >> >> >> >> > > > > > > > > > > <http:////
> > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > >> >> ir?t=garygregory-20&l=am2&o=1&
> > >> >> >> a=
> > >> >> >> >> > > > > > > > > > 1617290459>
> > >> >> >> >> > > > > > > > > > > JUnit in Action, Second Edition
> > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > >> >> >> >> product/1935182021/ref=as_li_
> > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > >> >> >> >> 9325&creativeASIN=1935182021&
> > >> >> >> >> > > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > >> >> >> >> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > >> >> >> >> > > > > > > > > 18%22
> > >> >> >> >> > > > > > > > > > >
> > >> >> >> >> > > > > > > > > > >
> > >> >> >> >> > > > > > > > > > > <http:////
> > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > >> >> ir?t=garygregory-20&l=am2&o=1&
> > >> >> >> a=
> > >> >> >> >> > > > > > > > > > 1935182021>
> > >> >> >> >> > > > > > > > > > > Spring Batch in Action
> > >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> > >> >> >> >> product/1935182951/ref=as_li_
> > >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > >> >> >> >> 9325&creativeASIN=1935182951&
> > >> >> >> >> > > > > > > > > >
> > >> >> >> >> > linkCode=%7B%7BlinkCode%7D%7D&
> tag=garygregory-20&linkId=%7B%
> > >> >> >> >> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+
> Batch+in+Action>
> > >> >> >> >> > > > > > > > > > > <http:////
> > >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> > >> >> ir?t=garygregory-20&l=am2&o=1&
> > >> >> >> a=
> > >> >> >> >> > > > > > > > > > 1935182951>
> > >> >> >> >> > > > > > > > > > > Blog: http://garygregory.wordpress.com
> > >> >> >> >> > > > > > > > > > > Home: http://garygregory.com/
> > >> >> >> >> > > > > > > > > > > Tweet! http://twitter.com/GaryGregory
> > >> >> >> >> > > > > > > > > >
> > >> >> >> >> > > > > > > > > >
> > >> >> >> >> > ------------------------------
> ------------------------------
> > >> >> >> >> > > > > > > ---------
> > >> >> >> >> > > > > > > > > > To unsubscribe, e-mail:
> > dev-unsubscribe@commons.
> > >> >> >> >> apache.org
> > >> >> >> >> > > > > > > > > > For additional commands, e-mail:
> > >> >> >> >> > dev-help@commons.apache.org
> > >> >> >> >> > > > > > > > > >
> > >> >> >> >> > > > > > > > > >
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > > > --
> > >> >> >> >> > > > > > > > > E-Mail: garydgregory@gmail.com |
> > >> ggregory@apache.org
> > >> >> >> >> > > > > > > > > Java Persistence with Hibernate, Second
> Edition
> > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > >> >> >> product/1617290459/ref=as_li_
> > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > >> >> >> >> 9325&creativeASIN=1617290459&
> > >> >> >> >> > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > >> >> >> >> > > > > > cadb800f39946ec62ea2b1af9fe6a2
> > >> >> >> >> > > > > > > b8>
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > >> >> >> >> > > > > > > > > 1617290459>
> > >> >> >> >> > > > > > > > > JUnit in Action, Second Edition
> > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > >> >> >> product/1935182021/ref=as_li_
> > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > >> >> >> >> 9325&creativeASIN=1935182021&
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > >> >> >> >> > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > >> >> >> >> > > > > > 18%22
> > >> >> >> >> > > > > > > > > >
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > >> >> >> >> > > > > > > > > 1935182021>
> > >> >> >> >> > > > > > > > > Spring Batch in Action
> > >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> > >> >> >> product/1935182951/ref=as_li_
> > >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> > >> >> >> >> 9325&creativeASIN=1935182951&
> > >> >> >> >> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
> > >> >> >> >> tag=garygregory-20&linkId=%7B%
> > >> >> >> >> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > >> >> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> > >> >> >> >> > > > > > > > > 1935182951>
> > >> >> >> >> > > > > > > > > Blog: http://garygregory.wordpress.com
> > >> >> >> >> > > > > > > > > Home: http://garygregory.com/
> > >> >> >> >> > > > > > > > > Tweet! http://twitter.com/GaryGregory
> > >> >> >> >> > > > > > > > >
> > >> >> >> >> > > > > > > >
> > >> >> >> >> > > > > > > >
> > >> >> >> >> > > > > > > >
> > >> >> >> >> > > > > > > > --
> > >> >> >> >> > > > > > > > Matt Sicker <bo...@gmail.com>
> > >> >> >> >> > > > > > >
> > >> >> >> >> > > > > >
> > >> >> >> >> > > > > >
> > >> >> >> >> > > > > >
> > >> >> >> >> > > > > > --
> > >> >> >> >> > > > > > Matt Sicker <bo...@gmail.com>
> > >> >> >> >> > > > > >
> > >> >> >> >> > > > >
> > >> >> >> >> > > > >
> > >> >> >> >> > > > >
> > >> >> >> >> > > > > --
> > >> >> >> >> > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > >> >> >> >> > > > > Java Persistence with Hibernate, Second Edition
> > >> >> >> >> > > > > <
> > >> >> >> >> > > > > https://www.amazon.com/gp/
> > product/1617290459/ref=as_li_
> > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > 9325&creativeASIN=1617290459&
> > >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> > >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2b8
> > >> >> >> >> > > > > >
> > >> >> >> >> > > > >
> > >> >> >> >> > > > > <http:////
> > >> >> >> >> > > > >
> > >> >> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> > >> >> >> a=1617290459
> > >> >> >> >> > > >
> > >> >> >> >> > > > > JUnit in Action, Second Edition
> > >> >> >> >> > > > > <
> > >> >> >> >> > > > > https://www.amazon.com/gp/
> > product/1935182021/ref=as_li_
> > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > 9325&creativeASIN=1935182021&
> > >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> > >> >> >> >> 31ecd1f6b6d1eaf8886ac902a24de4
> > >> >> >> >> > > 18%22
> > >> >> >> >> > > > > >
> > >> >> >> >> > > > >
> > >> >> >> >> > > > > <http:////
> > >> >> >> >> > > > >
> > >> >> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> > >> >> >> a=1935182021
> > >> >> >> >> > > >
> > >> >> >> >> > > > > Spring Batch in Action
> > >> >> >> >> > > > > <
> > >> >> >> >> > > > > https://www.amazon.com/gp/
> > product/1935182951/ref=as_li_
> > >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> > 9325&creativeASIN=1935182951&
> > >> >> >> >> > > > linkCode=%7B%7BlinkCode%7D%7D&
> > >> tag=garygregory-20&linkId=%7B%
> > >> >> >> >> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> > >> >> >> >> > > > > >
> > >> >> >> >> > > > > <http:////
> > >> >> >> >> > > > >
> > >> >> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> > >> >> >> a=1935182951
> > >> >> >> >> > > >
> > >> >> >> >> > > > > Blog: http://garygregory.wordpress.com
> > >> >> >> >> > > > > Home: http://garygregory.com/
> > >> >> >> >> > > > > Tweet! http://twitter.com/GaryGregory
> > >> >> >> >> > > > >
> > >> >> >> >> > > >
> > >> >> >> >> > >
> > >> >> >> >> > >
> > >> >> >> >> > >
> > >> >> >> >> > > --
> > >> >> >> >> > > Matt Sicker <bo...@gmail.com>
> > >> >> >> >> > >
> > >> >> >> >> >
> > >> >> >> >>
> > >> >> >> >
> > >> >> >> >
> > >> >> >> >
> > >> >> >> > --
> > >> >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > >> >> >> > Java Persistence with Hibernate, Second Edition
> > >> >> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > >> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > >> >> >> linkCode=as2&tag=garygregory-20&linkId=
> > >> cadb800f39946ec62ea2b1af9fe6a2
> > >> >> b8>
> > >> >> >> >
> > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > >> >> garygregory-20&l=am2&o=1&a=
> > >> >> >> 1617290459>
> > >> >> >> > JUnit in Action, Second Edition
> > >> >> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > >> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > >> >> >> linkCode=as2&tag=garygregory-20&linkId=
> > >> 31ecd1f6b6d1eaf8886ac902a24de4
> > >> >> 18%22
> > >> >> >> >
> > >> >> >> >
> > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > >> >> garygregory-20&l=am2&o=1&a=
> > >> >> >> 1935182021>
> > >> >> >> > Spring Batch in Action
> > >> >> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > >> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > >> >> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > >> >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > >> >> garygregory-20&l=am2&o=1&a=
> > >> >> >> 1935182951>
> > >> >> >> > Blog: http://garygregory.wordpress.com
> > >> >> >> > Home: http://garygregory.com/
> > >> >> >> > Tweet! http://twitter.com/GaryGregory
> > >> >> >>
> > >> >> >> ------------------------------------------------------------
> > >> ---------
> > >> >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > >> >> >> For additional commands, e-mail: dev-help@commons.apache.org
> > >> >> >>
> > >> >> >>
> > >> >> >
> > >> >> >
> > >> >> > --
> > >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > >> >> > Java Persistence with Hibernate, Second Edition
> > >> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > >> >> linkCode=as2&tag=garygregory-20&linkId=
> > cadb800f39946ec62ea2b1af9fe6a2
> > >> b8>
> > >> >> >
> > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > >> garygregory-20&l=am2&o=1&a=
> > >> >> 1617290459>
> > >> >> > JUnit in Action, Second Edition
> > >> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > >> >> linkCode=as2&tag=garygregory-20&linkId=
> > 31ecd1f6b6d1eaf8886ac902a24de4
> > >> 18%22
> > >> >> >
> > >> >> >
> > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > >> garygregory-20&l=am2&o=1&a=
> > >> >> 1935182021>
> > >> >> > Spring Batch in Action
> > >> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > >> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > >> garygregory-20&l=am2&o=1&a=
> > >> >> 1935182951>
> > >> >> > Blog: http://garygregory.wordpress.com
> > >> >> > Home: http://garygregory.com/
> > >> >> > Tweet! http://twitter.com/GaryGregory
> > >> >>
> > >> >> ------------------------------------------------------------
> > ---------
> > >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > >> >> For additional commands, e-mail: dev-help@commons.apache.org
> > >> >>
> > >> >>
> > >> >
> > >> >
> > >> > --
> > >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > >> > Java Persistence with Hibernate, Second Edition
> > >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > >> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
> > b8>
> > >> >
> > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > garygregory-20&l=am2&o=1&a=
> > >> 1617290459>
> > >> > JUnit in Action, Second Edition
> > >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > >> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> > 18%22
> > >> >
> > >> >
> > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > garygregory-20&l=am2&o=1&a=
> > >> 1935182021>
> > >> > Spring Batch in Action
> > >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > garygregory-20&l=am2&o=1&a=
> > >> 1935182951>
> > >> > Blog: http://garygregory.wordpress.com
> > >> > Home: http://garygregory.com/
> > >> > Tweet! http://twitter.com/GaryGregory
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > >> For additional commands, e-mail: dev-help@commons.apache.org
> > >>
> > >>
> > >
> > >
> > > --
> > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > Java Persistence with Hibernate, Second Edition
> > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> > >
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1617290459>
> > > JUnit in Action, Second Edition
> > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> 18%22
> > >
> > >
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1935182021>
> > > Spring Batch in Action
> > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1935182951>
> > > Blog: http://garygregory.wordpress.com
> > > Home: http://garygregory.com/
> > > Tweet! http://twitter.com/GaryGregory
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
>



-- 
Matt Sicker <bo...@gmail.com>

Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
Are you suggesting [lang] becomes a multi-module project?

Gary

On Nov 27, 2016 5:01 PM, "sebb" <se...@gmail.com> wrote:

> On 28 November 2016 at 00:11, Gary Gregory <ga...@gmail.com> wrote:
> > On Sun, Nov 27, 2016 at 4:09 PM, sebb <se...@gmail.com> wrote:
> >
> >> On 27 November 2016 at 23:51, Gary Gregory <ga...@gmail.com>
> wrote:
> >> > On Sun, Nov 27, 2016 at 3:41 PM, sebb <se...@gmail.com> wrote:
> >> >
> >> >> On 27 November 2016 at 22:31, Gary Gregory <ga...@gmail.com>
> >> wrote:
> >> >> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <se...@gmail.com> wrote:
> >> >> >
> >> >> >> On 27 November 2016 at 22:03, Gary Gregory <
> garydgregory@gmail.com>
> >> >> wrote:
> >> >> >> > These annotations are the SAME as have been published all over
> the
> >> >> place,
> >> >> >> > so I do not think we need a PR for review. Reviewing the code in
> >> the
> >> >> repo
> >> >> >> > should be enough, but I'm not sure _what_ there is to review
> >> really.
> >> >> I've
> >> >> >> > already posted a link to the sources (a pastebin link). I'll
> >> create a
> >> >> >> Jira
> >> >> >> > of course.
> >> >> >>
> >> >> >> There is one aspect that needs review: does the annotation belong
> in
> >> >> LANG?
> >> >> >> If we want to use the annotation in other components, do they
> have to
> >> >> >> depend on LANG?
> >> >> >>
> >> >> >
> >> >> > No see below and previous messages.
> >> >> >
> >> >> >
> >> >> >> If not, do they all have their own copies?
> >> >> >>
> >> >> >
> >> >> > No.
> >> >> >
> >> >> >
> >> >> >>
> >> >> >> And what happens when LANG needs a non-BC release?
> >> >> >>
> >> >> >
> >> >> > What is the issue I am missing?
> >> >> >
> >> >>
> >> >> The package name for the annotation might need to change
> >> >> That would be a downstream nuisance.
> >> >>
> >> >
> >> > Hi All,
> >> >
> >> > How is that different than changing the package name for any of our
> other
> >> > lang types?
> >>
> >> It's not.
> >>
> >> > If you want move a package, you have to break BC and we have clear
> >> > guidelines for that task.
> >>
> >> But why should I have to change package imports for annotations just
> >> because they happen to be in LANG?
> >>
> >> Note that this could get confusing.
> >>
> >> Say XYZ component starts out only needing lang for the annotations.
> >> So they include LANG 3.x and code the annotations.
> >>
> >> Later they find they want LANG 4.x for runtime.
> >> They would then need to drop the LANG 3.x dependency, fix up all the
> >> annotation imports etc.
> >> Unnecessary work if the annotations were in a separate component.
> >>
> >> Also, any tool that wants to check the annotations will have to look
> >> for them in lots of packages.
> >>
> >> Whilst it can no doubt be made to work, it's going to cause problems
> later.
> >>
> >
> > To be on the playful side, this is what my mother calls "borrowing
> trouble"
> > ;-)
> >
> > We can future-trip ourselves in all sorts of troubles. Our imaginations
> > know no bounds!  :-)
>
> This is not an imaginary scenario.
>
> We know that LANG will have a non-BC release at some point.
> The plan is to allow non-LANG components to share the LANG annotations.
> We know that components which originally don't need LANG may end up
> needing LANG at run-time.
> Therefore the problem will occur.
>
> In this case, "look before you leap" is appropriate.
>
> > Gary
> >
> >
> >>
> >> > Since already have a package called org.apache.commons.lang3.
> concurrent,
> >> I
> >> > propose we place these annottaions in
> >> > org.apache.commons.lang3.concurrent.annotation.
> >> >
> >> >
> >> >> >>
> >> >> >> My expectation for such annotations is that they would be
> >> >> >> self-contained (or built-in to the languange, not LANG).
> >> >> >>
> >> >> >
> >> >> > It is _because_ they are NOT built-in the language or JRE that we
> are
> >> >> > proposing they belong in [lang].
> >> >> >
> >> >> > Since we are providing the annotation with CLASS retention only
> >> >> > (initially), there is no hard dependency on [lang] at runtime.
> >> >> >
> >> >> > Is there some subtlety we are missing?
> >> >>
> >> >> Yes, the compile-time dependency.
> >> >>
> >> >
> >> > No surprise, right? You can't use an annotation without compiling the
> >> > source file.
> >> >
> >> >
> >> >> AFAIK it's not possible to have a Maven compile-only dependency;
> >> >> compile-time implies run-time.
> >> >>
> >> >
> >> > That's a tooling issue of course which should not invalidate the
> >> worthiness
> >> > of this feature.
> >> >
> >> > If I am a downstream user of Commons Lang's new annotations, I would
> >> need a
> >> > Maven scope that says "I need [lang] as a compile time only
> dependency" I
> >> > do not see such a scope on
> >> > https://maven.apache.org/guides/introduction/
> introduction-to-dependency-
> >> mechanism.html#Dependency_Scope
> >> >
> >> > Time for a Jira!
> >> >
> >> > I wonder what Gradle offers users in this dept.?
> >> >
> >> > Gary
> >> >
> >> >
> >> >>
> >> >> > Gary
> >> >> >
> >> >> >
> >> >> >> > Gary
> >> >> >> >
> >> >> >> > On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <
> >> britter@apache.org>
> >> >> >> wrote:
> >> >> >> >
> >> >> >> >> Hi,
> >> >> >> >>
> >> >> >> >> Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov.
> >> 2016
> >> >> um
> >> >> >> >> 21:01 Uhr:
> >> >> >> >>
> >> >> >> >> > So let's start with the CLASS retention annotations first.
> I'll
> >> >> commit
> >> >> >> >> > later today.
> >> >> >> >> >
> >> >> >> >>
> >> >> >> >> Maybe create a GitHub PR so people can have a look before it
> goes
> >> to
> >> >> >> >> master?
> >> >> >> >>
> >> >> >> >> Benedikt
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> >
> >> >> >> >> > Gary
> >> >> >> >> >
> >> >> >> >> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <bo...@gmail.com>
> >> wrote:
> >> >> >> >> >
> >> >> >> >> > > I feel like documenting thread safety in such a low level,
> >> widely
> >> >> >> used
> >> >> >> >> > > library like [lang] is a great idea. Whether it uses
> >> annotations,
> >> >> >> >> > javadocs,
> >> >> >> >> > > or some sort of informal javadoc comments isn't too big a
> >> deal to
> >> >> >> me,
> >> >> >> >> but
> >> >> >> >> > > providing some guarantees of thread safety or lack thereof
> >> would
> >> >> be
> >> >> >> >> > > invaluable information.
> >> >> >> >> > >
> >> >> >> >> > > On 27 November 2016 at 07:11, Benedikt Ritter <
> >> >> britter@apache.org>
> >> >> >> >> > wrote:
> >> >> >> >> > >
> >> >> >> >> > > > I thought we decided to abstain from documenting thread
> >> safety
> >> >> >> since
> >> >> >> >> it
> >> >> >> >> > > > would get outdated quickly anyway.
> >> >> >> >> > > >
> >> >> >> >> > > > Gary Gregory <ga...@gmail.com> schrieb am So.,
> 27.
> >> Nov.
> >> >> >> 2016
> >> >> >> >> um
> >> >> >> >> > > > 09:11 Uhr:
> >> >> >> >> > > >
> >> >> >> >> > > > > But if we then want a runtime version we had an odd
> >> packaging
> >> >> >> with
> >> >> >> >> > > CLASS
> >> >> >> >> > > > > retention in .concurrent. and RUNTIME in
> >> .concurrent.runtime.
> >> >> >> >> > > > >
> >> >> >> >> > > > > I might be in YAGNI territory here...
> >> >> >> >> > > > >
> >> >> >> >> > > > > Gary
> >> >> >> >> > > > >
> >> >> >> >> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <
> >> >> boards@gmail.com
> >> >> >> >
> >> >> >> >> > > wrote:
> >> >> >> >> > > > >
> >> >> >> >> > > > > > I think adding the additional clazz/runtime package
> >> would
> >> >> be a
> >> >> >> >> > little
> >> >> >> >> > > > > > overkill if you only include one packaging option for
> >> now.
> >> >> >> >> > > > > >
> >> >> >> >> > > > > > On 27 November 2016 at 00:04, Gary Gregory <
> >> >> >> >> garydgregory@gmail.com
> >> >> >> >> > >
> >> >> >> >> > > > > wrote:
> >> >> >> >> > > > > >
> >> >> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <
> >> boards@gmail.com
> >> >> >
> >> >> >> >> wrote:
> >> >> >> >> > > > > > > >
> >> >> >> >> > > > > > > > I can think of a couple use cases for runtime
> >> retention
> >> >> >> for
> >> >> >> >> > > thread
> >> >> >> >> > > > > > safety
> >> >> >> >> > > > > > > > annotations, but they're not specific to commons
> >> lang.
> >> >> >> >> > > > > > > >
> >> >> >> >> > > > > > > > 1. A framework could choose what type of data
> >> >> structure or
> >> >> >> >> > > > algorithm
> >> >> >> >> > > > > to
> >> >> >> >> > > > > > > use
> >> >> >> >> > > > > > > > at runtime based on the presence of which thread
> >> safety
> >> >> >> >> > > annotation
> >> >> >> >> > > > is
> >> >> >> >> > > > > > on.
> >> >> >> >> > > > > > > > Same for mutability.
> >> >> >> >> > > > > > > > 2. A testing framework could use these
> annotations
> >> to
> >> >> try
> >> >> >> and
> >> >> >> >> > > > > automate
> >> >> >> >> > > > > > > some
> >> >> >> >> > > > > > > > sort of thread safety tests, though that sounds
> >> like a
> >> >> >> hard
> >> >> >> >> > > problem
> >> >> >> >> > > > > to
> >> >> >> >> > > > > > > > actually implement.
> >> >> >> >> > > > > > > >
> >> >> >> >> > > > > > > > However, it'd be easier to just start with class
> >> >> retention
> >> >> >> >> (or
> >> >> >> >> > > > source
> >> >> >> >> > > > > > > > retention) just for documentation purposes.
> Higher
> >> >> >> retention
> >> >> >> >> > > levels
> >> >> >> >> > > > > > could
> >> >> >> >> > > > > > > > be added later if an important use case came up.
> >> >> >> >> > > > > > >
> >> >> >> >> > > > > > > But which packaging option?
> >> >> >> >> > > > > > >
> >> >> >> >> > > > > > > Gary
> >> >> >> >> > > > > > > >
> >> >> >> >> > > > > > > > On 26 November 2016 at 19:56, Gary Gregory <
> >> >> >> >> > > garydgregory@gmail.com
> >> >> >> >> > > > >
> >> >> >> >> > > > > > > wrote:
> >> >> >> >> > > > > > > >
> >> >> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <
> >> >> sebbaz@gmail.com
> >> >> >> >
> >> >> >> >> > > wrote:
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> >> >> >> >> > > > > garydgregory@gmail.com
> >> >> >> >> > > > > > >
> >> >> >> >> > > > > > > > > wrote:
> >> >> >> >> > > > > > > > > > > On a [crypto] thread, I mentioned
> >> >> >> >> > > > http://pastebin.com/RKPGGdJ9
> >> >> >> >> > > > > > to
> >> >> >> >> > > > > > > add
> >> >> >> >> > > > > > > > > > the
> >> >> >> >> > > > > > > > > > > "classic" four javax.annotation.concurrent
> >> >> >> annotations
> >> >> >> >> to
> >> >> >> >> > > two
> >> >> >> >> > > > > > > packages
> >> >> >> >> > > > > > > > > > > (.clazz and .runtime) in Commons Lang for
> >> CLASS
> >> >> and
> >> >> >> >> > RUNTIME
> >> >> >> >> > > > > > > retentions.
> >> >> >> >> > > > > > > > > > >
> >> >> >> >> > > > > > > > > > > You'd use the CLASS version to avoid a hard
> >> >> >> dependency
> >> >> >> >> on
> >> >> >> >> > > > > [lang].
> >> >> >> >> > > > > > > > > RUNTIME
> >> >> >> >> > > > > > > > > > > to keep them around.
> >> >> >> >> > > > > > > > > > >
> >> >> >> >> > > > > > > > > > > We'd use the CLASS versions in all of
> Commons
> >> for
> >> >> >> >> > > documenting
> >> >> >> >> > > > > > > thread
> >> >> >> >> > > > > > > > > > safety.
> >> >> >> >> > > > > > > > > > >
> >> >> >> >> > > > > > > > > > > Thoughts?
> >> >> >> >> > > > > > > > > >
> >> >> >> >> > > > > > > > > > Definitely Class retention, not Runtime.
> >> >> >> >> > > > > > > > > > You don't want to have to include the
> annotation
> >> >> jar
> >> >> >> on
> >> >> >> >> the
> >> >> >> >> > > > > runtime
> >> >> >> >> > > > > > > > > > classpath.
> >> >> >> >> > > > > > > > > >
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > > > Hi Sebb,
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > > > Right now I have both of these packages:
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> >> >> annotation.concurrent.clazz
> >> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> >> >> >> annotation.concurrent.runtime
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > > > Each with a copy of:
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > > > GuardedBy
> >> >> >> >> > > > > > > > > Immutable
> >> >> >> >> > > > > > > > > NotThreadSafe
> >> >> >> >> > > > > > > > > ThreadSafe
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > > > Should we include what I have as is?
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > > > If we were to only provide the annotation at
> the
> >> >> CLASS
> >> >> >> >> > > retention
> >> >> >> >> > > > > > level,
> >> >> >> >> > > > > > > > > should we still package them in
> >> >> >> >> > ...annotation.concurrent.clazz
> >> >> >> >> > > in
> >> >> >> >> > > > > > case
> >> >> >> >> > > > > > > we
> >> >> >> >> > > > > > > > > want to provide annotation.concurrent.runtime
> >> later?
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > > > If we know for certain we never want to provide
> >> >> RUNTIME
> >> >> >> >> > > > retention,
> >> >> >> >> > > > > we
> >> >> >> >> > > > > > > can
> >> >> >> >> > > > > > > > > put them all in annotation.concurrent now.
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > > > Thoughts?
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > > > Gary
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > > > > [I don't know why the annotations were ever
> >> >> considered
> >> >> >> >> > > suitable
> >> >> >> >> > > > > for
> >> >> >> >> > > > > > > > > > runtime]
> >> >> >> >> > > > > > > > > >
> >> >> >> >> > > > > > > > > > > Gary
> >> >> >> >> > > > > > > > > > >
> >> >> >> >> > > > > > > > > > > --
> >> >> >> >> > > > > > > > > > > E-Mail: garydgregory@gmail.com |
> >> >> >> ggregory@apache.org
> >> >> >> >> > > > > > > > > > > Java Persistence with Hibernate, Second
> >> Edition
> >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> >> >> >> >> product/1617290459/ref=as_li_
> >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> >> >> 9325&creativeASIN=1617290459&
> >> >> >> >> > > > > > > > > >
> >> >> >> >> > > > > > >
> >> >> >> >> > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2
> >> >> >> >> > > b8>
> >> >> >> >> > > > > > > > > > >
> >> >> >> >> > > > > > > > > > > <http:////
> >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> >> >> ir?t=garygregory-20&l=am2&o=1&
> >> >> >> a=
> >> >> >> >> > > > > > > > > > 1617290459>
> >> >> >> >> > > > > > > > > > > JUnit in Action, Second Edition
> >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> >> >> >> >> product/1935182021/ref=as_li_
> >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> >> >> 9325&creativeASIN=1935182021&
> >> >> >> >> > > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> >> >> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> >> >> >> >> > > > > > > > > 18%22
> >> >> >> >> > > > > > > > > > >
> >> >> >> >> > > > > > > > > > >
> >> >> >> >> > > > > > > > > > > <http:////
> >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> >> >> ir?t=garygregory-20&l=am2&o=1&
> >> >> >> a=
> >> >> >> >> > > > > > > > > > 1935182021>
> >> >> >> >> > > > > > > > > > > Spring Batch in Action
> >> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> >> >> >> >> product/1935182951/ref=as_li_
> >> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> >> >> 9325&creativeASIN=1935182951&
> >> >> >> >> > > > > > > > > >
> >> >> >> >> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >> >> >> >> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> >> >> >> > > > > > > > > > > <http:////
> >> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> >> >> ir?t=garygregory-20&l=am2&o=1&
> >> >> >> a=
> >> >> >> >> > > > > > > > > > 1935182951>
> >> >> >> >> > > > > > > > > > > Blog: http://garygregory.wordpress.com
> >> >> >> >> > > > > > > > > > > Home: http://garygregory.com/
> >> >> >> >> > > > > > > > > > > Tweet! http://twitter.com/GaryGregory
> >> >> >> >> > > > > > > > > >
> >> >> >> >> > > > > > > > > >
> >> >> >> >> > ------------------------------------------------------------
> >> >> >> >> > > > > > > ---------
> >> >> >> >> > > > > > > > > > To unsubscribe, e-mail:
> dev-unsubscribe@commons.
> >> >> >> >> apache.org
> >> >> >> >> > > > > > > > > > For additional commands, e-mail:
> >> >> >> >> > dev-help@commons.apache.org
> >> >> >> >> > > > > > > > > >
> >> >> >> >> > > > > > > > > >
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > > > --
> >> >> >> >> > > > > > > > > E-Mail: garydgregory@gmail.com |
> >> ggregory@apache.org
> >> >> >> >> > > > > > > > > Java Persistence with Hibernate, Second Edition
> >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> >> >> >> product/1617290459/ref=as_li_
> >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> >> >> 9325&creativeASIN=1617290459&
> >> >> >> >> > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> >> >> > > > > > cadb800f39946ec62ea2b1af9fe6a2
> >> >> >> >> > > > > > > b8>
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> >> >> >> >> > > > > > > > > 1617290459>
> >> >> >> >> > > > > > > > > JUnit in Action, Second Edition
> >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> >> >> >> product/1935182021/ref=as_li_
> >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> >> >> 9325&creativeASIN=1935182021&
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> >> >> > > > 31ecd1f6b6d1eaf8886ac902a24de4
> >> >> >> >> > > > > > 18%22
> >> >> >> >> > > > > > > > > >
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> >> >> >> >> > > > > > > > > 1935182021>
> >> >> >> >> > > > > > > > > Spring Batch in Action
> >> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> >> >> >> product/1935182951/ref=as_li_
> >> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> >> >> 9325&creativeASIN=1935182951&
> >> >> >> >> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
> >> >> >> >> tag=garygregory-20&linkId=%7B%
> >> >> >> >> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> >> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> >> >> >> >> > > > > > > > > 1935182951>
> >> >> >> >> > > > > > > > > Blog: http://garygregory.wordpress.com
> >> >> >> >> > > > > > > > > Home: http://garygregory.com/
> >> >> >> >> > > > > > > > > Tweet! http://twitter.com/GaryGregory
> >> >> >> >> > > > > > > > >
> >> >> >> >> > > > > > > >
> >> >> >> >> > > > > > > >
> >> >> >> >> > > > > > > >
> >> >> >> >> > > > > > > > --
> >> >> >> >> > > > > > > > Matt Sicker <bo...@gmail.com>
> >> >> >> >> > > > > > >
> >> >> >> >> > > > > >
> >> >> >> >> > > > > >
> >> >> >> >> > > > > >
> >> >> >> >> > > > > > --
> >> >> >> >> > > > > > Matt Sicker <bo...@gmail.com>
> >> >> >> >> > > > > >
> >> >> >> >> > > > >
> >> >> >> >> > > > >
> >> >> >> >> > > > >
> >> >> >> >> > > > > --
> >> >> >> >> > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >> >> >> >> > > > > Java Persistence with Hibernate, Second Edition
> >> >> >> >> > > > > <
> >> >> >> >> > > > > https://www.amazon.com/gp/
> product/1617290459/ref=as_li_
> >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> 9325&creativeASIN=1617290459&
> >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> >> >> cadb800f39946ec62ea2b1af9fe6a2b8
> >> >> >> >> > > > > >
> >> >> >> >> > > > >
> >> >> >> >> > > > > <http:////
> >> >> >> >> > > > >
> >> >> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> >> >> >> a=1617290459
> >> >> >> >> > > >
> >> >> >> >> > > > > JUnit in Action, Second Edition
> >> >> >> >> > > > > <
> >> >> >> >> > > > > https://www.amazon.com/gp/
> product/1935182021/ref=as_li_
> >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> 9325&creativeASIN=1935182021&
> >> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> >> >> 31ecd1f6b6d1eaf8886ac902a24de4
> >> >> >> >> > > 18%22
> >> >> >> >> > > > > >
> >> >> >> >> > > > >
> >> >> >> >> > > > > <http:////
> >> >> >> >> > > > >
> >> >> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> >> >> >> a=1935182021
> >> >> >> >> > > >
> >> >> >> >> > > > > Spring Batch in Action
> >> >> >> >> > > > > <
> >> >> >> >> > > > > https://www.amazon.com/gp/
> product/1935182951/ref=as_li_
> >> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=
> 9325&creativeASIN=1935182951&
> >> >> >> >> > > > linkCode=%7B%7BlinkCode%7D%7D&
> >> tag=garygregory-20&linkId=%7B%
> >> >> >> >> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> >> >> >> >> > > > > >
> >> >> >> >> > > > > <http:////
> >> >> >> >> > > > >
> >> >> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> >> >> >> a=1935182951
> >> >> >> >> > > >
> >> >> >> >> > > > > Blog: http://garygregory.wordpress.com
> >> >> >> >> > > > > Home: http://garygregory.com/
> >> >> >> >> > > > > Tweet! http://twitter.com/GaryGregory
> >> >> >> >> > > > >
> >> >> >> >> > > >
> >> >> >> >> > >
> >> >> >> >> > >
> >> >> >> >> > >
> >> >> >> >> > > --
> >> >> >> >> > > Matt Sicker <bo...@gmail.com>
> >> >> >> >> > >
> >> >> >> >> >
> >> >> >> >>
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > --
> >> >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >> >> >> > Java Persistence with Hibernate, Second Edition
> >> >> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> >> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> >> >> >> linkCode=as2&tag=garygregory-20&linkId=
> >> cadb800f39946ec62ea2b1af9fe6a2
> >> >> b8>
> >> >> >> >
> >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> >> garygregory-20&l=am2&o=1&a=
> >> >> >> 1617290459>
> >> >> >> > JUnit in Action, Second Edition
> >> >> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> >> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> >> >> >> linkCode=as2&tag=garygregory-20&linkId=
> >> 31ecd1f6b6d1eaf8886ac902a24de4
> >> >> 18%22
> >> >> >> >
> >> >> >> >
> >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> >> garygregory-20&l=am2&o=1&a=
> >> >> >> 1935182021>
> >> >> >> > Spring Batch in Action
> >> >> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> >> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> >> >> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >> >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> >> garygregory-20&l=am2&o=1&a=
> >> >> >> 1935182951>
> >> >> >> > Blog: http://garygregory.wordpress.com
> >> >> >> > Home: http://garygregory.com/
> >> >> >> > Tweet! http://twitter.com/GaryGregory
> >> >> >>
> >> >> >> ------------------------------------------------------------
> >> ---------
> >> >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >> >> >> For additional commands, e-mail: dev-help@commons.apache.org
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >> > --
> >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >> >> > Java Persistence with Hibernate, Second Edition
> >> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> >> >> linkCode=as2&tag=garygregory-20&linkId=
> cadb800f39946ec62ea2b1af9fe6a2
> >> b8>
> >> >> >
> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> garygregory-20&l=am2&o=1&a=
> >> >> 1617290459>
> >> >> > JUnit in Action, Second Edition
> >> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> >> >> linkCode=as2&tag=garygregory-20&linkId=
> 31ecd1f6b6d1eaf8886ac902a24de4
> >> 18%22
> >> >> >
> >> >> >
> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> garygregory-20&l=am2&o=1&a=
> >> >> 1935182021>
> >> >> > Spring Batch in Action
> >> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> >> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> garygregory-20&l=am2&o=1&a=
> >> >> 1935182951>
> >> >> > Blog: http://garygregory.wordpress.com
> >> >> > Home: http://garygregory.com/
> >> >> > Tweet! http://twitter.com/GaryGregory
> >> >>
> >> >> ------------------------------------------------------------
> ---------
> >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >> >> For additional commands, e-mail: dev-help@commons.apache.org
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >> > Java Persistence with Hibernate, Second Edition
> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> >> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
> b8>
> >> >
> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> >> 1617290459>
> >> > JUnit in Action, Second Edition
> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> >> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> 18%22
> >> >
> >> >
> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> >> 1935182021>
> >> > Spring Batch in Action
> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> >> 1935182951>
> >> > Blog: http://garygregory.wordpress.com
> >> > Home: http://garygregory.com/
> >> > Tweet! http://twitter.com/GaryGregory
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >> For additional commands, e-mail: dev-help@commons.apache.org
> >>
> >>
> >
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > Java Persistence with Hibernate, Second Edition
> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> > JUnit in Action, Second Edition
> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> > Spring Batch in Action
> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Re: [lang] Thread safety annotations

Posted by sebb <se...@gmail.com>.
On 28 November 2016 at 00:11, Gary Gregory <ga...@gmail.com> wrote:
> On Sun, Nov 27, 2016 at 4:09 PM, sebb <se...@gmail.com> wrote:
>
>> On 27 November 2016 at 23:51, Gary Gregory <ga...@gmail.com> wrote:
>> > On Sun, Nov 27, 2016 at 3:41 PM, sebb <se...@gmail.com> wrote:
>> >
>> >> On 27 November 2016 at 22:31, Gary Gregory <ga...@gmail.com>
>> wrote:
>> >> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <se...@gmail.com> wrote:
>> >> >
>> >> >> On 27 November 2016 at 22:03, Gary Gregory <ga...@gmail.com>
>> >> wrote:
>> >> >> > These annotations are the SAME as have been published all over the
>> >> place,
>> >> >> > so I do not think we need a PR for review. Reviewing the code in
>> the
>> >> repo
>> >> >> > should be enough, but I'm not sure _what_ there is to review
>> really.
>> >> I've
>> >> >> > already posted a link to the sources (a pastebin link). I'll
>> create a
>> >> >> Jira
>> >> >> > of course.
>> >> >>
>> >> >> There is one aspect that needs review: does the annotation belong in
>> >> LANG?
>> >> >> If we want to use the annotation in other components, do they have to
>> >> >> depend on LANG?
>> >> >>
>> >> >
>> >> > No see below and previous messages.
>> >> >
>> >> >
>> >> >> If not, do they all have their own copies?
>> >> >>
>> >> >
>> >> > No.
>> >> >
>> >> >
>> >> >>
>> >> >> And what happens when LANG needs a non-BC release?
>> >> >>
>> >> >
>> >> > What is the issue I am missing?
>> >> >
>> >>
>> >> The package name for the annotation might need to change
>> >> That would be a downstream nuisance.
>> >>
>> >
>> > Hi All,
>> >
>> > How is that different than changing the package name for any of our other
>> > lang types?
>>
>> It's not.
>>
>> > If you want move a package, you have to break BC and we have clear
>> > guidelines for that task.
>>
>> But why should I have to change package imports for annotations just
>> because they happen to be in LANG?
>>
>> Note that this could get confusing.
>>
>> Say XYZ component starts out only needing lang for the annotations.
>> So they include LANG 3.x and code the annotations.
>>
>> Later they find they want LANG 4.x for runtime.
>> They would then need to drop the LANG 3.x dependency, fix up all the
>> annotation imports etc.
>> Unnecessary work if the annotations were in a separate component.
>>
>> Also, any tool that wants to check the annotations will have to look
>> for them in lots of packages.
>>
>> Whilst it can no doubt be made to work, it's going to cause problems later.
>>
>
> To be on the playful side, this is what my mother calls "borrowing trouble"
> ;-)
>
> We can future-trip ourselves in all sorts of troubles. Our imaginations
> know no bounds!  :-)

This is not an imaginary scenario.

We know that LANG will have a non-BC release at some point.
The plan is to allow non-LANG components to share the LANG annotations.
We know that components which originally don't need LANG may end up
needing LANG at run-time.
Therefore the problem will occur.

In this case, "look before you leap" is appropriate.

> Gary
>
>
>>
>> > Since already have a package called org.apache.commons.lang3.concurrent,
>> I
>> > propose we place these annottaions in
>> > org.apache.commons.lang3.concurrent.annotation.
>> >
>> >
>> >> >>
>> >> >> My expectation for such annotations is that they would be
>> >> >> self-contained (or built-in to the languange, not LANG).
>> >> >>
>> >> >
>> >> > It is _because_ they are NOT built-in the language or JRE that we are
>> >> > proposing they belong in [lang].
>> >> >
>> >> > Since we are providing the annotation with CLASS retention only
>> >> > (initially), there is no hard dependency on [lang] at runtime.
>> >> >
>> >> > Is there some subtlety we are missing?
>> >>
>> >> Yes, the compile-time dependency.
>> >>
>> >
>> > No surprise, right? You can't use an annotation without compiling the
>> > source file.
>> >
>> >
>> >> AFAIK it's not possible to have a Maven compile-only dependency;
>> >> compile-time implies run-time.
>> >>
>> >
>> > That's a tooling issue of course which should not invalidate the
>> worthiness
>> > of this feature.
>> >
>> > If I am a downstream user of Commons Lang's new annotations, I would
>> need a
>> > Maven scope that says "I need [lang] as a compile time only dependency" I
>> > do not see such a scope on
>> > https://maven.apache.org/guides/introduction/introduction-to-dependency-
>> mechanism.html#Dependency_Scope
>> >
>> > Time for a Jira!
>> >
>> > I wonder what Gradle offers users in this dept.?
>> >
>> > Gary
>> >
>> >
>> >>
>> >> > Gary
>> >> >
>> >> >
>> >> >> > Gary
>> >> >> >
>> >> >> > On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <
>> britter@apache.org>
>> >> >> wrote:
>> >> >> >
>> >> >> >> Hi,
>> >> >> >>
>> >> >> >> Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov.
>> 2016
>> >> um
>> >> >> >> 21:01 Uhr:
>> >> >> >>
>> >> >> >> > So let's start with the CLASS retention annotations first. I'll
>> >> commit
>> >> >> >> > later today.
>> >> >> >> >
>> >> >> >>
>> >> >> >> Maybe create a GitHub PR so people can have a look before it goes
>> to
>> >> >> >> master?
>> >> >> >>
>> >> >> >> Benedikt
>> >> >> >>
>> >> >> >>
>> >> >> >> >
>> >> >> >> > Gary
>> >> >> >> >
>> >> >> >> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <bo...@gmail.com>
>> wrote:
>> >> >> >> >
>> >> >> >> > > I feel like documenting thread safety in such a low level,
>> widely
>> >> >> used
>> >> >> >> > > library like [lang] is a great idea. Whether it uses
>> annotations,
>> >> >> >> > javadocs,
>> >> >> >> > > or some sort of informal javadoc comments isn't too big a
>> deal to
>> >> >> me,
>> >> >> >> but
>> >> >> >> > > providing some guarantees of thread safety or lack thereof
>> would
>> >> be
>> >> >> >> > > invaluable information.
>> >> >> >> > >
>> >> >> >> > > On 27 November 2016 at 07:11, Benedikt Ritter <
>> >> britter@apache.org>
>> >> >> >> > wrote:
>> >> >> >> > >
>> >> >> >> > > > I thought we decided to abstain from documenting thread
>> safety
>> >> >> since
>> >> >> >> it
>> >> >> >> > > > would get outdated quickly anyway.
>> >> >> >> > > >
>> >> >> >> > > > Gary Gregory <ga...@gmail.com> schrieb am So., 27.
>> Nov.
>> >> >> 2016
>> >> >> >> um
>> >> >> >> > > > 09:11 Uhr:
>> >> >> >> > > >
>> >> >> >> > > > > But if we then want a runtime version we had an odd
>> packaging
>> >> >> with
>> >> >> >> > > CLASS
>> >> >> >> > > > > retention in .concurrent. and RUNTIME in
>> .concurrent.runtime.
>> >> >> >> > > > >
>> >> >> >> > > > > I might be in YAGNI territory here...
>> >> >> >> > > > >
>> >> >> >> > > > > Gary
>> >> >> >> > > > >
>> >> >> >> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <
>> >> boards@gmail.com
>> >> >> >
>> >> >> >> > > wrote:
>> >> >> >> > > > >
>> >> >> >> > > > > > I think adding the additional clazz/runtime package
>> would
>> >> be a
>> >> >> >> > little
>> >> >> >> > > > > > overkill if you only include one packaging option for
>> now.
>> >> >> >> > > > > >
>> >> >> >> > > > > > On 27 November 2016 at 00:04, Gary Gregory <
>> >> >> >> garydgregory@gmail.com
>> >> >> >> > >
>> >> >> >> > > > > wrote:
>> >> >> >> > > > > >
>> >> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <
>> boards@gmail.com
>> >> >
>> >> >> >> wrote:
>> >> >> >> > > > > > > >
>> >> >> >> > > > > > > > I can think of a couple use cases for runtime
>> retention
>> >> >> for
>> >> >> >> > > thread
>> >> >> >> > > > > > safety
>> >> >> >> > > > > > > > annotations, but they're not specific to commons
>> lang.
>> >> >> >> > > > > > > >
>> >> >> >> > > > > > > > 1. A framework could choose what type of data
>> >> structure or
>> >> >> >> > > > algorithm
>> >> >> >> > > > > to
>> >> >> >> > > > > > > use
>> >> >> >> > > > > > > > at runtime based on the presence of which thread
>> safety
>> >> >> >> > > annotation
>> >> >> >> > > > is
>> >> >> >> > > > > > on.
>> >> >> >> > > > > > > > Same for mutability.
>> >> >> >> > > > > > > > 2. A testing framework could use these annotations
>> to
>> >> try
>> >> >> and
>> >> >> >> > > > > automate
>> >> >> >> > > > > > > some
>> >> >> >> > > > > > > > sort of thread safety tests, though that sounds
>> like a
>> >> >> hard
>> >> >> >> > > problem
>> >> >> >> > > > > to
>> >> >> >> > > > > > > > actually implement.
>> >> >> >> > > > > > > >
>> >> >> >> > > > > > > > However, it'd be easier to just start with class
>> >> retention
>> >> >> >> (or
>> >> >> >> > > > source
>> >> >> >> > > > > > > > retention) just for documentation purposes. Higher
>> >> >> retention
>> >> >> >> > > levels
>> >> >> >> > > > > > could
>> >> >> >> > > > > > > > be added later if an important use case came up.
>> >> >> >> > > > > > >
>> >> >> >> > > > > > > But which packaging option?
>> >> >> >> > > > > > >
>> >> >> >> > > > > > > Gary
>> >> >> >> > > > > > > >
>> >> >> >> > > > > > > > On 26 November 2016 at 19:56, Gary Gregory <
>> >> >> >> > > garydgregory@gmail.com
>> >> >> >> > > > >
>> >> >> >> > > > > > > wrote:
>> >> >> >> > > > > > > >
>> >> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <
>> >> sebbaz@gmail.com
>> >> >> >
>> >> >> >> > > wrote:
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
>> >> >> >> > > > > garydgregory@gmail.com
>> >> >> >> > > > > > >
>> >> >> >> > > > > > > > > wrote:
>> >> >> >> > > > > > > > > > > On a [crypto] thread, I mentioned
>> >> >> >> > > > http://pastebin.com/RKPGGdJ9
>> >> >> >> > > > > > to
>> >> >> >> > > > > > > add
>> >> >> >> > > > > > > > > > the
>> >> >> >> > > > > > > > > > > "classic" four javax.annotation.concurrent
>> >> >> annotations
>> >> >> >> to
>> >> >> >> > > two
>> >> >> >> > > > > > > packages
>> >> >> >> > > > > > > > > > > (.clazz and .runtime) in Commons Lang for
>> CLASS
>> >> and
>> >> >> >> > RUNTIME
>> >> >> >> > > > > > > retentions.
>> >> >> >> > > > > > > > > > >
>> >> >> >> > > > > > > > > > > You'd use the CLASS version to avoid a hard
>> >> >> dependency
>> >> >> >> on
>> >> >> >> > > > > [lang].
>> >> >> >> > > > > > > > > RUNTIME
>> >> >> >> > > > > > > > > > > to keep them around.
>> >> >> >> > > > > > > > > > >
>> >> >> >> > > > > > > > > > > We'd use the CLASS versions in all of Commons
>> for
>> >> >> >> > > documenting
>> >> >> >> > > > > > > thread
>> >> >> >> > > > > > > > > > safety.
>> >> >> >> > > > > > > > > > >
>> >> >> >> > > > > > > > > > > Thoughts?
>> >> >> >> > > > > > > > > >
>> >> >> >> > > > > > > > > > Definitely Class retention, not Runtime.
>> >> >> >> > > > > > > > > > You don't want to have to include the annotation
>> >> jar
>> >> >> on
>> >> >> >> the
>> >> >> >> > > > > runtime
>> >> >> >> > > > > > > > > > classpath.
>> >> >> >> > > > > > > > > >
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > > > Hi Sebb,
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > > > Right now I have both of these packages:
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > > > - org.apache.commons.lang3.
>> >> annotation.concurrent.clazz
>> >> >> >> > > > > > > > > - org.apache.commons.lang3.
>> >> >> annotation.concurrent.runtime
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > > > Each with a copy of:
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > > > GuardedBy
>> >> >> >> > > > > > > > > Immutable
>> >> >> >> > > > > > > > > NotThreadSafe
>> >> >> >> > > > > > > > > ThreadSafe
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > > > Should we include what I have as is?
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > > > If we were to only provide the annotation at the
>> >> CLASS
>> >> >> >> > > retention
>> >> >> >> > > > > > level,
>> >> >> >> > > > > > > > > should we still package them in
>> >> >> >> > ...annotation.concurrent.clazz
>> >> >> >> > > in
>> >> >> >> > > > > > case
>> >> >> >> > > > > > > we
>> >> >> >> > > > > > > > > want to provide annotation.concurrent.runtime
>> later?
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > > > If we know for certain we never want to provide
>> >> RUNTIME
>> >> >> >> > > > retention,
>> >> >> >> > > > > we
>> >> >> >> > > > > > > can
>> >> >> >> > > > > > > > > put them all in annotation.concurrent now.
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > > > Thoughts?
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > > > Gary
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > > > > [I don't know why the annotations were ever
>> >> considered
>> >> >> >> > > suitable
>> >> >> >> > > > > for
>> >> >> >> > > > > > > > > > runtime]
>> >> >> >> > > > > > > > > >
>> >> >> >> > > > > > > > > > > Gary
>> >> >> >> > > > > > > > > > >
>> >> >> >> > > > > > > > > > > --
>> >> >> >> > > > > > > > > > > E-Mail: garydgregory@gmail.com |
>> >> >> ggregory@apache.org
>> >> >> >> > > > > > > > > > > Java Persistence with Hibernate, Second
>> Edition
>> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
>> >> >> >> product/1617290459/ref=as_li_
>> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> >> 9325&creativeASIN=1617290459&
>> >> >> >> > > > > > > > > >
>> >> >> >> > > > > > >
>> >> >> >> > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> >> cadb800f39946ec62ea2b1af9fe6a2
>> >> >> >> > > b8>
>> >> >> >> > > > > > > > > > >
>> >> >> >> > > > > > > > > > > <http:////
>> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
>> >> ir?t=garygregory-20&l=am2&o=1&
>> >> >> a=
>> >> >> >> > > > > > > > > > 1617290459>
>> >> >> >> > > > > > > > > > > JUnit in Action, Second Edition
>> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
>> >> >> >> product/1935182021/ref=as_li_
>> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> >> 9325&creativeASIN=1935182021&
>> >> >> >> > > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> >> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
>> >> >> >> > > > > > > > > 18%22
>> >> >> >> > > > > > > > > > >
>> >> >> >> > > > > > > > > > >
>> >> >> >> > > > > > > > > > > <http:////
>> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
>> >> ir?t=garygregory-20&l=am2&o=1&
>> >> >> a=
>> >> >> >> > > > > > > > > > 1935182021>
>> >> >> >> > > > > > > > > > > Spring Batch in Action
>> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
>> >> >> >> product/1935182951/ref=as_li_
>> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> >> 9325&creativeASIN=1935182951&
>> >> >> >> > > > > > > > > >
>> >> >> >> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> >> >> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> >> >> > > > > > > > > > > <http:////
>> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
>> >> ir?t=garygregory-20&l=am2&o=1&
>> >> >> a=
>> >> >> >> > > > > > > > > > 1935182951>
>> >> >> >> > > > > > > > > > > Blog: http://garygregory.wordpress.com
>> >> >> >> > > > > > > > > > > Home: http://garygregory.com/
>> >> >> >> > > > > > > > > > > Tweet! http://twitter.com/GaryGregory
>> >> >> >> > > > > > > > > >
>> >> >> >> > > > > > > > > >
>> >> >> >> > ------------------------------------------------------------
>> >> >> >> > > > > > > ---------
>> >> >> >> > > > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.
>> >> >> >> apache.org
>> >> >> >> > > > > > > > > > For additional commands, e-mail:
>> >> >> >> > dev-help@commons.apache.org
>> >> >> >> > > > > > > > > >
>> >> >> >> > > > > > > > > >
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > > > --
>> >> >> >> > > > > > > > > E-Mail: garydgregory@gmail.com |
>> ggregory@apache.org
>> >> >> >> > > > > > > > > Java Persistence with Hibernate, Second Edition
>> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
>> >> >> product/1617290459/ref=as_li_
>> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> >> 9325&creativeASIN=1617290459&
>> >> >> >> > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> >> > > > > > cadb800f39946ec62ea2b1af9fe6a2
>> >> >> >> > > > > > > b8>
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
>> >> >> >> > > > > > > > > 1617290459>
>> >> >> >> > > > > > > > > JUnit in Action, Second Edition
>> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
>> >> >> product/1935182021/ref=as_li_
>> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> >> 9325&creativeASIN=1935182021&
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> >> > > > 31ecd1f6b6d1eaf8886ac902a24de4
>> >> >> >> > > > > > 18%22
>> >> >> >> > > > > > > > > >
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
>> >> >> >> > > > > > > > > 1935182021>
>> >> >> >> > > > > > > > > Spring Batch in Action
>> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
>> >> >> product/1935182951/ref=as_li_
>> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> >> 9325&creativeASIN=1935182951&
>> >> >> >> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
>> >> >> >> tag=garygregory-20&linkId=%7B%
>> >> >> >> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
>> >> >> >> > > > > > > > > 1935182951>
>> >> >> >> > > > > > > > > Blog: http://garygregory.wordpress.com
>> >> >> >> > > > > > > > > Home: http://garygregory.com/
>> >> >> >> > > > > > > > > Tweet! http://twitter.com/GaryGregory
>> >> >> >> > > > > > > > >
>> >> >> >> > > > > > > >
>> >> >> >> > > > > > > >
>> >> >> >> > > > > > > >
>> >> >> >> > > > > > > > --
>> >> >> >> > > > > > > > Matt Sicker <bo...@gmail.com>
>> >> >> >> > > > > > >
>> >> >> >> > > > > >
>> >> >> >> > > > > >
>> >> >> >> > > > > >
>> >> >> >> > > > > > --
>> >> >> >> > > > > > Matt Sicker <bo...@gmail.com>
>> >> >> >> > > > > >
>> >> >> >> > > > >
>> >> >> >> > > > >
>> >> >> >> > > > >
>> >> >> >> > > > > --
>> >> >> >> > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> >> >> >> > > > > Java Persistence with Hibernate, Second Edition
>> >> >> >> > > > > <
>> >> >> >> > > > > https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> >> cadb800f39946ec62ea2b1af9fe6a2b8
>> >> >> >> > > > > >
>> >> >> >> > > > >
>> >> >> >> > > > > <http:////
>> >> >> >> > > > >
>> >> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> >> >> a=1617290459
>> >> >> >> > > >
>> >> >> >> > > > > JUnit in Action, Second Edition
>> >> >> >> > > > > <
>> >> >> >> > > > > https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> >> 31ecd1f6b6d1eaf8886ac902a24de4
>> >> >> >> > > 18%22
>> >> >> >> > > > > >
>> >> >> >> > > > >
>> >> >> >> > > > > <http:////
>> >> >> >> > > > >
>> >> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> >> >> a=1935182021
>> >> >> >> > > >
>> >> >> >> > > > > Spring Batch in Action
>> >> >> >> > > > > <
>> >> >> >> > > > > https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> >> >> >> > > > linkCode=%7B%7BlinkCode%7D%7D&
>> tag=garygregory-20&linkId=%7B%
>> >> >> >> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
>> >> >> >> > > > > >
>> >> >> >> > > > > <http:////
>> >> >> >> > > > >
>> >> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> >> >> a=1935182951
>> >> >> >> > > >
>> >> >> >> > > > > Blog: http://garygregory.wordpress.com
>> >> >> >> > > > > Home: http://garygregory.com/
>> >> >> >> > > > > Tweet! http://twitter.com/GaryGregory
>> >> >> >> > > > >
>> >> >> >> > > >
>> >> >> >> > >
>> >> >> >> > >
>> >> >> >> > >
>> >> >> >> > > --
>> >> >> >> > > Matt Sicker <bo...@gmail.com>
>> >> >> >> > >
>> >> >> >> >
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> >> >> > Java Persistence with Hibernate, Second Edition
>> >> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> >> >> linkCode=as2&tag=garygregory-20&linkId=
>> cadb800f39946ec62ea2b1af9fe6a2
>> >> b8>
>> >> >> >
>> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> garygregory-20&l=am2&o=1&a=
>> >> >> 1617290459>
>> >> >> > JUnit in Action, Second Edition
>> >> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> >> >> linkCode=as2&tag=garygregory-20&linkId=
>> 31ecd1f6b6d1eaf8886ac902a24de4
>> >> 18%22
>> >> >> >
>> >> >> >
>> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> garygregory-20&l=am2&o=1&a=
>> >> >> 1935182021>
>> >> >> > Spring Batch in Action
>> >> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> >> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> garygregory-20&l=am2&o=1&a=
>> >> >> 1935182951>
>> >> >> > Blog: http://garygregory.wordpress.com
>> >> >> > Home: http://garygregory.com/
>> >> >> > Tweet! http://twitter.com/GaryGregory
>> >> >>
>> >> >> ------------------------------------------------------------
>> ---------
>> >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> >> >> For additional commands, e-mail: dev-help@commons.apache.org
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> > --
>> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> >> > Java Persistence with Hibernate, Second Edition
>> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> >> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
>> b8>
>> >> >
>> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> garygregory-20&l=am2&o=1&a=
>> >> 1617290459>
>> >> > JUnit in Action, Second Edition
>> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> >> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
>> 18%22
>> >> >
>> >> >
>> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> garygregory-20&l=am2&o=1&a=
>> >> 1935182021>
>> >> > Spring Batch in Action
>> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> garygregory-20&l=am2&o=1&a=
>> >> 1935182951>
>> >> > Blog: http://garygregory.wordpress.com
>> >> > Home: http://garygregory.com/
>> >> > Tweet! http://twitter.com/GaryGregory
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> >> For additional commands, e-mail: dev-help@commons.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > Java Persistence with Hibernate, Second Edition
>> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>> >
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1617290459>
>> > JUnit in Action, Second Edition
>> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
>> >
>> >
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1935182021>
>> > Spring Batch in Action
>> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1935182951>
>> > Blog: http://garygregory.wordpress.com
>> > Home: http://garygregory.com/
>> > Tweet! http://twitter.com/GaryGregory
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory

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


Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
On Sun, Nov 27, 2016 at 4:09 PM, sebb <se...@gmail.com> wrote:

> On 27 November 2016 at 23:51, Gary Gregory <ga...@gmail.com> wrote:
> > On Sun, Nov 27, 2016 at 3:41 PM, sebb <se...@gmail.com> wrote:
> >
> >> On 27 November 2016 at 22:31, Gary Gregory <ga...@gmail.com>
> wrote:
> >> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <se...@gmail.com> wrote:
> >> >
> >> >> On 27 November 2016 at 22:03, Gary Gregory <ga...@gmail.com>
> >> wrote:
> >> >> > These annotations are the SAME as have been published all over the
> >> place,
> >> >> > so I do not think we need a PR for review. Reviewing the code in
> the
> >> repo
> >> >> > should be enough, but I'm not sure _what_ there is to review
> really.
> >> I've
> >> >> > already posted a link to the sources (a pastebin link). I'll
> create a
> >> >> Jira
> >> >> > of course.
> >> >>
> >> >> There is one aspect that needs review: does the annotation belong in
> >> LANG?
> >> >> If we want to use the annotation in other components, do they have to
> >> >> depend on LANG?
> >> >>
> >> >
> >> > No see below and previous messages.
> >> >
> >> >
> >> >> If not, do they all have their own copies?
> >> >>
> >> >
> >> > No.
> >> >
> >> >
> >> >>
> >> >> And what happens when LANG needs a non-BC release?
> >> >>
> >> >
> >> > What is the issue I am missing?
> >> >
> >>
> >> The package name for the annotation might need to change
> >> That would be a downstream nuisance.
> >>
> >
> > Hi All,
> >
> > How is that different than changing the package name for any of our other
> > lang types?
>
> It's not.
>
> > If you want move a package, you have to break BC and we have clear
> > guidelines for that task.
>
> But why should I have to change package imports for annotations just
> because they happen to be in LANG?
>
> Note that this could get confusing.
>
> Say XYZ component starts out only needing lang for the annotations.
> So they include LANG 3.x and code the annotations.
>
> Later they find they want LANG 4.x for runtime.
> They would then need to drop the LANG 3.x dependency, fix up all the
> annotation imports etc.
> Unnecessary work if the annotations were in a separate component.
>
> Also, any tool that wants to check the annotations will have to look
> for them in lots of packages.
>
> Whilst it can no doubt be made to work, it's going to cause problems later.
>

To be on the playful side, this is what my mother calls "borrowing trouble"
;-)

We can future-trip ourselves in all sorts of troubles. Our imaginations
know no bounds!  :-)

Gary


>
> > Since already have a package called org.apache.commons.lang3.concurrent,
> I
> > propose we place these annottaions in
> > org.apache.commons.lang3.concurrent.annotation.
> >
> >
> >> >>
> >> >> My expectation for such annotations is that they would be
> >> >> self-contained (or built-in to the languange, not LANG).
> >> >>
> >> >
> >> > It is _because_ they are NOT built-in the language or JRE that we are
> >> > proposing they belong in [lang].
> >> >
> >> > Since we are providing the annotation with CLASS retention only
> >> > (initially), there is no hard dependency on [lang] at runtime.
> >> >
> >> > Is there some subtlety we are missing?
> >>
> >> Yes, the compile-time dependency.
> >>
> >
> > No surprise, right? You can't use an annotation without compiling the
> > source file.
> >
> >
> >> AFAIK it's not possible to have a Maven compile-only dependency;
> >> compile-time implies run-time.
> >>
> >
> > That's a tooling issue of course which should not invalidate the
> worthiness
> > of this feature.
> >
> > If I am a downstream user of Commons Lang's new annotations, I would
> need a
> > Maven scope that says "I need [lang] as a compile time only dependency" I
> > do not see such a scope on
> > https://maven.apache.org/guides/introduction/introduction-to-dependency-
> mechanism.html#Dependency_Scope
> >
> > Time for a Jira!
> >
> > I wonder what Gradle offers users in this dept.?
> >
> > Gary
> >
> >
> >>
> >> > Gary
> >> >
> >> >
> >> >> > Gary
> >> >> >
> >> >> > On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <
> britter@apache.org>
> >> >> wrote:
> >> >> >
> >> >> >> Hi,
> >> >> >>
> >> >> >> Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov.
> 2016
> >> um
> >> >> >> 21:01 Uhr:
> >> >> >>
> >> >> >> > So let's start with the CLASS retention annotations first. I'll
> >> commit
> >> >> >> > later today.
> >> >> >> >
> >> >> >>
> >> >> >> Maybe create a GitHub PR so people can have a look before it goes
> to
> >> >> >> master?
> >> >> >>
> >> >> >> Benedikt
> >> >> >>
> >> >> >>
> >> >> >> >
> >> >> >> > Gary
> >> >> >> >
> >> >> >> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <bo...@gmail.com>
> wrote:
> >> >> >> >
> >> >> >> > > I feel like documenting thread safety in such a low level,
> widely
> >> >> used
> >> >> >> > > library like [lang] is a great idea. Whether it uses
> annotations,
> >> >> >> > javadocs,
> >> >> >> > > or some sort of informal javadoc comments isn't too big a
> deal to
> >> >> me,
> >> >> >> but
> >> >> >> > > providing some guarantees of thread safety or lack thereof
> would
> >> be
> >> >> >> > > invaluable information.
> >> >> >> > >
> >> >> >> > > On 27 November 2016 at 07:11, Benedikt Ritter <
> >> britter@apache.org>
> >> >> >> > wrote:
> >> >> >> > >
> >> >> >> > > > I thought we decided to abstain from documenting thread
> safety
> >> >> since
> >> >> >> it
> >> >> >> > > > would get outdated quickly anyway.
> >> >> >> > > >
> >> >> >> > > > Gary Gregory <ga...@gmail.com> schrieb am So., 27.
> Nov.
> >> >> 2016
> >> >> >> um
> >> >> >> > > > 09:11 Uhr:
> >> >> >> > > >
> >> >> >> > > > > But if we then want a runtime version we had an odd
> packaging
> >> >> with
> >> >> >> > > CLASS
> >> >> >> > > > > retention in .concurrent. and RUNTIME in
> .concurrent.runtime.
> >> >> >> > > > >
> >> >> >> > > > > I might be in YAGNI territory here...
> >> >> >> > > > >
> >> >> >> > > > > Gary
> >> >> >> > > > >
> >> >> >> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <
> >> boards@gmail.com
> >> >> >
> >> >> >> > > wrote:
> >> >> >> > > > >
> >> >> >> > > > > > I think adding the additional clazz/runtime package
> would
> >> be a
> >> >> >> > little
> >> >> >> > > > > > overkill if you only include one packaging option for
> now.
> >> >> >> > > > > >
> >> >> >> > > > > > On 27 November 2016 at 00:04, Gary Gregory <
> >> >> >> garydgregory@gmail.com
> >> >> >> > >
> >> >> >> > > > > wrote:
> >> >> >> > > > > >
> >> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <
> boards@gmail.com
> >> >
> >> >> >> wrote:
> >> >> >> > > > > > > >
> >> >> >> > > > > > > > I can think of a couple use cases for runtime
> retention
> >> >> for
> >> >> >> > > thread
> >> >> >> > > > > > safety
> >> >> >> > > > > > > > annotations, but they're not specific to commons
> lang.
> >> >> >> > > > > > > >
> >> >> >> > > > > > > > 1. A framework could choose what type of data
> >> structure or
> >> >> >> > > > algorithm
> >> >> >> > > > > to
> >> >> >> > > > > > > use
> >> >> >> > > > > > > > at runtime based on the presence of which thread
> safety
> >> >> >> > > annotation
> >> >> >> > > > is
> >> >> >> > > > > > on.
> >> >> >> > > > > > > > Same for mutability.
> >> >> >> > > > > > > > 2. A testing framework could use these annotations
> to
> >> try
> >> >> and
> >> >> >> > > > > automate
> >> >> >> > > > > > > some
> >> >> >> > > > > > > > sort of thread safety tests, though that sounds
> like a
> >> >> hard
> >> >> >> > > problem
> >> >> >> > > > > to
> >> >> >> > > > > > > > actually implement.
> >> >> >> > > > > > > >
> >> >> >> > > > > > > > However, it'd be easier to just start with class
> >> retention
> >> >> >> (or
> >> >> >> > > > source
> >> >> >> > > > > > > > retention) just for documentation purposes. Higher
> >> >> retention
> >> >> >> > > levels
> >> >> >> > > > > > could
> >> >> >> > > > > > > > be added later if an important use case came up.
> >> >> >> > > > > > >
> >> >> >> > > > > > > But which packaging option?
> >> >> >> > > > > > >
> >> >> >> > > > > > > Gary
> >> >> >> > > > > > > >
> >> >> >> > > > > > > > On 26 November 2016 at 19:56, Gary Gregory <
> >> >> >> > > garydgregory@gmail.com
> >> >> >> > > > >
> >> >> >> > > > > > > wrote:
> >> >> >> > > > > > > >
> >> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <
> >> sebbaz@gmail.com
> >> >> >
> >> >> >> > > wrote:
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> >> >> >> > > > > garydgregory@gmail.com
> >> >> >> > > > > > >
> >> >> >> > > > > > > > > wrote:
> >> >> >> > > > > > > > > > > On a [crypto] thread, I mentioned
> >> >> >> > > > http://pastebin.com/RKPGGdJ9
> >> >> >> > > > > > to
> >> >> >> > > > > > > add
> >> >> >> > > > > > > > > > the
> >> >> >> > > > > > > > > > > "classic" four javax.annotation.concurrent
> >> >> annotations
> >> >> >> to
> >> >> >> > > two
> >> >> >> > > > > > > packages
> >> >> >> > > > > > > > > > > (.clazz and .runtime) in Commons Lang for
> CLASS
> >> and
> >> >> >> > RUNTIME
> >> >> >> > > > > > > retentions.
> >> >> >> > > > > > > > > > >
> >> >> >> > > > > > > > > > > You'd use the CLASS version to avoid a hard
> >> >> dependency
> >> >> >> on
> >> >> >> > > > > [lang].
> >> >> >> > > > > > > > > RUNTIME
> >> >> >> > > > > > > > > > > to keep them around.
> >> >> >> > > > > > > > > > >
> >> >> >> > > > > > > > > > > We'd use the CLASS versions in all of Commons
> for
> >> >> >> > > documenting
> >> >> >> > > > > > > thread
> >> >> >> > > > > > > > > > safety.
> >> >> >> > > > > > > > > > >
> >> >> >> > > > > > > > > > > Thoughts?
> >> >> >> > > > > > > > > >
> >> >> >> > > > > > > > > > Definitely Class retention, not Runtime.
> >> >> >> > > > > > > > > > You don't want to have to include the annotation
> >> jar
> >> >> on
> >> >> >> the
> >> >> >> > > > > runtime
> >> >> >> > > > > > > > > > classpath.
> >> >> >> > > > > > > > > >
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > > > Hi Sebb,
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > > > Right now I have both of these packages:
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> >> annotation.concurrent.clazz
> >> >> >> > > > > > > > > - org.apache.commons.lang3.
> >> >> annotation.concurrent.runtime
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > > > Each with a copy of:
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > > > GuardedBy
> >> >> >> > > > > > > > > Immutable
> >> >> >> > > > > > > > > NotThreadSafe
> >> >> >> > > > > > > > > ThreadSafe
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > > > Should we include what I have as is?
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > > > If we were to only provide the annotation at the
> >> CLASS
> >> >> >> > > retention
> >> >> >> > > > > > level,
> >> >> >> > > > > > > > > should we still package them in
> >> >> >> > ...annotation.concurrent.clazz
> >> >> >> > > in
> >> >> >> > > > > > case
> >> >> >> > > > > > > we
> >> >> >> > > > > > > > > want to provide annotation.concurrent.runtime
> later?
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > > > If we know for certain we never want to provide
> >> RUNTIME
> >> >> >> > > > retention,
> >> >> >> > > > > we
> >> >> >> > > > > > > can
> >> >> >> > > > > > > > > put them all in annotation.concurrent now.
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > > > Thoughts?
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > > > Gary
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > > > > [I don't know why the annotations were ever
> >> considered
> >> >> >> > > suitable
> >> >> >> > > > > for
> >> >> >> > > > > > > > > > runtime]
> >> >> >> > > > > > > > > >
> >> >> >> > > > > > > > > > > Gary
> >> >> >> > > > > > > > > > >
> >> >> >> > > > > > > > > > > --
> >> >> >> > > > > > > > > > > E-Mail: garydgregory@gmail.com |
> >> >> ggregory@apache.org
> >> >> >> > > > > > > > > > > Java Persistence with Hibernate, Second
> Edition
> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> >> >> >> product/1617290459/ref=as_li_
> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> >> 9325&creativeASIN=1617290459&
> >> >> >> > > > > > > > > >
> >> >> >> > > > > > >
> >> >> >> > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> >> cadb800f39946ec62ea2b1af9fe6a2
> >> >> >> > > b8>
> >> >> >> > > > > > > > > > >
> >> >> >> > > > > > > > > > > <http:////
> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> >> ir?t=garygregory-20&l=am2&o=1&
> >> >> a=
> >> >> >> > > > > > > > > > 1617290459>
> >> >> >> > > > > > > > > > > JUnit in Action, Second Edition
> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> >> >> >> product/1935182021/ref=as_li_
> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> >> 9325&creativeASIN=1935182021&
> >> >> >> > > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> >> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> >> >> >> > > > > > > > > 18%22
> >> >> >> > > > > > > > > > >
> >> >> >> > > > > > > > > > >
> >> >> >> > > > > > > > > > > <http:////
> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> >> ir?t=garygregory-20&l=am2&o=1&
> >> >> a=
> >> >> >> > > > > > > > > > 1935182021>
> >> >> >> > > > > > > > > > > Spring Batch in Action
> >> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> >> >> >> product/1935182951/ref=as_li_
> >> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> >> 9325&creativeASIN=1935182951&
> >> >> >> > > > > > > > > >
> >> >> >> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >> >> >> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> >> >> > > > > > > > > > > <http:////
> >> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> >> ir?t=garygregory-20&l=am2&o=1&
> >> >> a=
> >> >> >> > > > > > > > > > 1935182951>
> >> >> >> > > > > > > > > > > Blog: http://garygregory.wordpress.com
> >> >> >> > > > > > > > > > > Home: http://garygregory.com/
> >> >> >> > > > > > > > > > > Tweet! http://twitter.com/GaryGregory
> >> >> >> > > > > > > > > >
> >> >> >> > > > > > > > > >
> >> >> >> > ------------------------------------------------------------
> >> >> >> > > > > > > ---------
> >> >> >> > > > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.
> >> >> >> apache.org
> >> >> >> > > > > > > > > > For additional commands, e-mail:
> >> >> >> > dev-help@commons.apache.org
> >> >> >> > > > > > > > > >
> >> >> >> > > > > > > > > >
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > > > --
> >> >> >> > > > > > > > > E-Mail: garydgregory@gmail.com |
> ggregory@apache.org
> >> >> >> > > > > > > > > Java Persistence with Hibernate, Second Edition
> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> >> >> product/1617290459/ref=as_li_
> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> >> 9325&creativeASIN=1617290459&
> >> >> >> > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> >> > > > > > cadb800f39946ec62ea2b1af9fe6a2
> >> >> >> > > > > > > b8>
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> >> >> >> > > > > > > > > 1617290459>
> >> >> >> > > > > > > > > JUnit in Action, Second Edition
> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> >> >> product/1935182021/ref=as_li_
> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> >> 9325&creativeASIN=1935182021&
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> >> > > > 31ecd1f6b6d1eaf8886ac902a24de4
> >> >> >> > > > > > 18%22
> >> >> >> > > > > > > > > >
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> >> >> >> > > > > > > > > 1935182021>
> >> >> >> > > > > > > > > Spring Batch in Action
> >> >> >> > > > > > > > > <https://www.amazon.com/gp/
> >> >> product/1935182951/ref=as_li_
> >> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> >> 9325&creativeASIN=1935182951&
> >> >> >> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
> >> >> >> tag=garygregory-20&linkId=%7B%
> >> >> >> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> >> >> >> > > > > > > > > 1935182951>
> >> >> >> > > > > > > > > Blog: http://garygregory.wordpress.com
> >> >> >> > > > > > > > > Home: http://garygregory.com/
> >> >> >> > > > > > > > > Tweet! http://twitter.com/GaryGregory
> >> >> >> > > > > > > > >
> >> >> >> > > > > > > >
> >> >> >> > > > > > > >
> >> >> >> > > > > > > >
> >> >> >> > > > > > > > --
> >> >> >> > > > > > > > Matt Sicker <bo...@gmail.com>
> >> >> >> > > > > > >
> >> >> >> > > > > >
> >> >> >> > > > > >
> >> >> >> > > > > >
> >> >> >> > > > > > --
> >> >> >> > > > > > Matt Sicker <bo...@gmail.com>
> >> >> >> > > > > >
> >> >> >> > > > >
> >> >> >> > > > >
> >> >> >> > > > >
> >> >> >> > > > > --
> >> >> >> > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >> >> >> > > > > Java Persistence with Hibernate, Second Edition
> >> >> >> > > > > <
> >> >> >> > > > > https://www.amazon.com/gp/product/1617290459/ref=as_li_
> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> >> cadb800f39946ec62ea2b1af9fe6a2b8
> >> >> >> > > > > >
> >> >> >> > > > >
> >> >> >> > > > > <http:////
> >> >> >> > > > >
> >> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> >> >> a=1617290459
> >> >> >> > > >
> >> >> >> > > > > JUnit in Action, Second Edition
> >> >> >> > > > > <
> >> >> >> > > > > https://www.amazon.com/gp/product/1935182021/ref=as_li_
> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> >> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> >> 31ecd1f6b6d1eaf8886ac902a24de4
> >> >> >> > > 18%22
> >> >> >> > > > > >
> >> >> >> > > > >
> >> >> >> > > > > <http:////
> >> >> >> > > > >
> >> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> >> >> a=1935182021
> >> >> >> > > >
> >> >> >> > > > > Spring Batch in Action
> >> >> >> > > > > <
> >> >> >> > > > > https://www.amazon.com/gp/product/1935182951/ref=as_li_
> >> >> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> >> >> >> > > > linkCode=%7B%7BlinkCode%7D%7D&
> tag=garygregory-20&linkId=%7B%
> >> >> >> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> >> >> >> > > > > >
> >> >> >> > > > > <http:////
> >> >> >> > > > >
> >> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> >> >> a=1935182951
> >> >> >> > > >
> >> >> >> > > > > Blog: http://garygregory.wordpress.com
> >> >> >> > > > > Home: http://garygregory.com/
> >> >> >> > > > > Tweet! http://twitter.com/GaryGregory
> >> >> >> > > > >
> >> >> >> > > >
> >> >> >> > >
> >> >> >> > >
> >> >> >> > >
> >> >> >> > > --
> >> >> >> > > Matt Sicker <bo...@gmail.com>
> >> >> >> > >
> >> >> >> >
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >> >> > Java Persistence with Hibernate, Second Edition
> >> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> >> >> linkCode=as2&tag=garygregory-20&linkId=
> cadb800f39946ec62ea2b1af9fe6a2
> >> b8>
> >> >> >
> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> garygregory-20&l=am2&o=1&a=
> >> >> 1617290459>
> >> >> > JUnit in Action, Second Edition
> >> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> >> >> linkCode=as2&tag=garygregory-20&linkId=
> 31ecd1f6b6d1eaf8886ac902a24de4
> >> 18%22
> >> >> >
> >> >> >
> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> garygregory-20&l=am2&o=1&a=
> >> >> 1935182021>
> >> >> > Spring Batch in Action
> >> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> >> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> garygregory-20&l=am2&o=1&a=
> >> >> 1935182951>
> >> >> > Blog: http://garygregory.wordpress.com
> >> >> > Home: http://garygregory.com/
> >> >> > Tweet! http://twitter.com/GaryGregory
> >> >>
> >> >> ------------------------------------------------------------
> ---------
> >> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >> >> For additional commands, e-mail: dev-help@commons.apache.org
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >> > Java Persistence with Hibernate, Second Edition
> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> >> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
> b8>
> >> >
> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> >> 1617290459>
> >> > JUnit in Action, Second Edition
> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> >> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> 18%22
> >> >
> >> >
> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> >> 1935182021>
> >> > Spring Batch in Action
> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> >> 1935182951>
> >> > Blog: http://garygregory.wordpress.com
> >> > Home: http://garygregory.com/
> >> > Tweet! http://twitter.com/GaryGregory
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >> For additional commands, e-mail: dev-help@commons.apache.org
> >>
> >>
> >
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > Java Persistence with Hibernate, Second Edition
> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> > JUnit in Action, Second Edition
> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> > Spring Batch in Action
> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] Thread safety annotations

Posted by sebb <se...@gmail.com>.
On 27 November 2016 at 23:51, Gary Gregory <ga...@gmail.com> wrote:
> On Sun, Nov 27, 2016 at 3:41 PM, sebb <se...@gmail.com> wrote:
>
>> On 27 November 2016 at 22:31, Gary Gregory <ga...@gmail.com> wrote:
>> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <se...@gmail.com> wrote:
>> >
>> >> On 27 November 2016 at 22:03, Gary Gregory <ga...@gmail.com>
>> wrote:
>> >> > These annotations are the SAME as have been published all over the
>> place,
>> >> > so I do not think we need a PR for review. Reviewing the code in the
>> repo
>> >> > should be enough, but I'm not sure _what_ there is to review really.
>> I've
>> >> > already posted a link to the sources (a pastebin link). I'll create a
>> >> Jira
>> >> > of course.
>> >>
>> >> There is one aspect that needs review: does the annotation belong in
>> LANG?
>> >> If we want to use the annotation in other components, do they have to
>> >> depend on LANG?
>> >>
>> >
>> > No see below and previous messages.
>> >
>> >
>> >> If not, do they all have their own copies?
>> >>
>> >
>> > No.
>> >
>> >
>> >>
>> >> And what happens when LANG needs a non-BC release?
>> >>
>> >
>> > What is the issue I am missing?
>> >
>>
>> The package name for the annotation might need to change
>> That would be a downstream nuisance.
>>
>
> Hi All,
>
> How is that different than changing the package name for any of our other
> lang types?

It's not.

> If you want move a package, you have to break BC and we have clear
> guidelines for that task.

But why should I have to change package imports for annotations just
because they happen to be in LANG?

Note that this could get confusing.

Say XYZ component starts out only needing lang for the annotations.
So they include LANG 3.x and code the annotations.

Later they find they want LANG 4.x for runtime.
They would then need to drop the LANG 3.x dependency, fix up all the
annotation imports etc.
Unnecessary work if the annotations were in a separate component.

Also, any tool that wants to check the annotations will have to look
for them in lots of packages.

Whilst it can no doubt be made to work, it's going to cause problems later.

> Since already have a package called org.apache.commons.lang3.concurrent, I
> propose we place these annottaions in
> org.apache.commons.lang3.concurrent.annotation.
>
>
>> >>
>> >> My expectation for such annotations is that they would be
>> >> self-contained (or built-in to the languange, not LANG).
>> >>
>> >
>> > It is _because_ they are NOT built-in the language or JRE that we are
>> > proposing they belong in [lang].
>> >
>> > Since we are providing the annotation with CLASS retention only
>> > (initially), there is no hard dependency on [lang] at runtime.
>> >
>> > Is there some subtlety we are missing?
>>
>> Yes, the compile-time dependency.
>>
>
> No surprise, right? You can't use an annotation without compiling the
> source file.
>
>
>> AFAIK it's not possible to have a Maven compile-only dependency;
>> compile-time implies run-time.
>>
>
> That's a tooling issue of course which should not invalidate the worthiness
> of this feature.
>
> If I am a downstream user of Commons Lang's new annotations, I would need a
> Maven scope that says "I need [lang] as a compile time only dependency" I
> do not see such a scope on
> https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope
>
> Time for a Jira!
>
> I wonder what Gradle offers users in this dept.?
>
> Gary
>
>
>>
>> > Gary
>> >
>> >
>> >> > Gary
>> >> >
>> >> > On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <br...@apache.org>
>> >> wrote:
>> >> >
>> >> >> Hi,
>> >> >>
>> >> >> Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov. 2016
>> um
>> >> >> 21:01 Uhr:
>> >> >>
>> >> >> > So let's start with the CLASS retention annotations first. I'll
>> commit
>> >> >> > later today.
>> >> >> >
>> >> >>
>> >> >> Maybe create a GitHub PR so people can have a look before it goes to
>> >> >> master?
>> >> >>
>> >> >> Benedikt
>> >> >>
>> >> >>
>> >> >> >
>> >> >> > Gary
>> >> >> >
>> >> >> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <bo...@gmail.com> wrote:
>> >> >> >
>> >> >> > > I feel like documenting thread safety in such a low level, widely
>> >> used
>> >> >> > > library like [lang] is a great idea. Whether it uses annotations,
>> >> >> > javadocs,
>> >> >> > > or some sort of informal javadoc comments isn't too big a deal to
>> >> me,
>> >> >> but
>> >> >> > > providing some guarantees of thread safety or lack thereof would
>> be
>> >> >> > > invaluable information.
>> >> >> > >
>> >> >> > > On 27 November 2016 at 07:11, Benedikt Ritter <
>> britter@apache.org>
>> >> >> > wrote:
>> >> >> > >
>> >> >> > > > I thought we decided to abstain from documenting thread safety
>> >> since
>> >> >> it
>> >> >> > > > would get outdated quickly anyway.
>> >> >> > > >
>> >> >> > > > Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov.
>> >> 2016
>> >> >> um
>> >> >> > > > 09:11 Uhr:
>> >> >> > > >
>> >> >> > > > > But if we then want a runtime version we had an odd packaging
>> >> with
>> >> >> > > CLASS
>> >> >> > > > > retention in .concurrent. and RUNTIME in .concurrent.runtime.
>> >> >> > > > >
>> >> >> > > > > I might be in YAGNI territory here...
>> >> >> > > > >
>> >> >> > > > > Gary
>> >> >> > > > >
>> >> >> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <
>> boards@gmail.com
>> >> >
>> >> >> > > wrote:
>> >> >> > > > >
>> >> >> > > > > > I think adding the additional clazz/runtime package would
>> be a
>> >> >> > little
>> >> >> > > > > > overkill if you only include one packaging option for now.
>> >> >> > > > > >
>> >> >> > > > > > On 27 November 2016 at 00:04, Gary Gregory <
>> >> >> garydgregory@gmail.com
>> >> >> > >
>> >> >> > > > > wrote:
>> >> >> > > > > >
>> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <boards@gmail.com
>> >
>> >> >> wrote:
>> >> >> > > > > > > >
>> >> >> > > > > > > > I can think of a couple use cases for runtime retention
>> >> for
>> >> >> > > thread
>> >> >> > > > > > safety
>> >> >> > > > > > > > annotations, but they're not specific to commons lang.
>> >> >> > > > > > > >
>> >> >> > > > > > > > 1. A framework could choose what type of data
>> structure or
>> >> >> > > > algorithm
>> >> >> > > > > to
>> >> >> > > > > > > use
>> >> >> > > > > > > > at runtime based on the presence of which thread safety
>> >> >> > > annotation
>> >> >> > > > is
>> >> >> > > > > > on.
>> >> >> > > > > > > > Same for mutability.
>> >> >> > > > > > > > 2. A testing framework could use these annotations to
>> try
>> >> and
>> >> >> > > > > automate
>> >> >> > > > > > > some
>> >> >> > > > > > > > sort of thread safety tests, though that sounds like a
>> >> hard
>> >> >> > > problem
>> >> >> > > > > to
>> >> >> > > > > > > > actually implement.
>> >> >> > > > > > > >
>> >> >> > > > > > > > However, it'd be easier to just start with class
>> retention
>> >> >> (or
>> >> >> > > > source
>> >> >> > > > > > > > retention) just for documentation purposes. Higher
>> >> retention
>> >> >> > > levels
>> >> >> > > > > > could
>> >> >> > > > > > > > be added later if an important use case came up.
>> >> >> > > > > > >
>> >> >> > > > > > > But which packaging option?
>> >> >> > > > > > >
>> >> >> > > > > > > Gary
>> >> >> > > > > > > >
>> >> >> > > > > > > > On 26 November 2016 at 19:56, Gary Gregory <
>> >> >> > > garydgregory@gmail.com
>> >> >> > > > >
>> >> >> > > > > > > wrote:
>> >> >> > > > > > > >
>> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <
>> sebbaz@gmail.com
>> >> >
>> >> >> > > wrote:
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
>> >> >> > > > > garydgregory@gmail.com
>> >> >> > > > > > >
>> >> >> > > > > > > > > wrote:
>> >> >> > > > > > > > > > > On a [crypto] thread, I mentioned
>> >> >> > > > http://pastebin.com/RKPGGdJ9
>> >> >> > > > > > to
>> >> >> > > > > > > add
>> >> >> > > > > > > > > > the
>> >> >> > > > > > > > > > > "classic" four javax.annotation.concurrent
>> >> annotations
>> >> >> to
>> >> >> > > two
>> >> >> > > > > > > packages
>> >> >> > > > > > > > > > > (.clazz and .runtime) in Commons Lang for CLASS
>> and
>> >> >> > RUNTIME
>> >> >> > > > > > > retentions.
>> >> >> > > > > > > > > > >
>> >> >> > > > > > > > > > > You'd use the CLASS version to avoid a hard
>> >> dependency
>> >> >> on
>> >> >> > > > > [lang].
>> >> >> > > > > > > > > RUNTIME
>> >> >> > > > > > > > > > > to keep them around.
>> >> >> > > > > > > > > > >
>> >> >> > > > > > > > > > > We'd use the CLASS versions in all of Commons for
>> >> >> > > documenting
>> >> >> > > > > > > thread
>> >> >> > > > > > > > > > safety.
>> >> >> > > > > > > > > > >
>> >> >> > > > > > > > > > > Thoughts?
>> >> >> > > > > > > > > >
>> >> >> > > > > > > > > > Definitely Class retention, not Runtime.
>> >> >> > > > > > > > > > You don't want to have to include the annotation
>> jar
>> >> on
>> >> >> the
>> >> >> > > > > runtime
>> >> >> > > > > > > > > > classpath.
>> >> >> > > > > > > > > >
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > Hi Sebb,
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > Right now I have both of these packages:
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > - org.apache.commons.lang3.
>> annotation.concurrent.clazz
>> >> >> > > > > > > > > - org.apache.commons.lang3.
>> >> annotation.concurrent.runtime
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > Each with a copy of:
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > GuardedBy
>> >> >> > > > > > > > > Immutable
>> >> >> > > > > > > > > NotThreadSafe
>> >> >> > > > > > > > > ThreadSafe
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > Should we include what I have as is?
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > If we were to only provide the annotation at the
>> CLASS
>> >> >> > > retention
>> >> >> > > > > > level,
>> >> >> > > > > > > > > should we still package them in
>> >> >> > ...annotation.concurrent.clazz
>> >> >> > > in
>> >> >> > > > > > case
>> >> >> > > > > > > we
>> >> >> > > > > > > > > want to provide annotation.concurrent.runtime later?
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > If we know for certain we never want to provide
>> RUNTIME
>> >> >> > > > retention,
>> >> >> > > > > we
>> >> >> > > > > > > can
>> >> >> > > > > > > > > put them all in annotation.concurrent now.
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > Thoughts?
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > Gary
>> >> >> > > > > > > > >
>> >> >> > > > > > > > >
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > > [I don't know why the annotations were ever
>> considered
>> >> >> > > suitable
>> >> >> > > > > for
>> >> >> > > > > > > > > > runtime]
>> >> >> > > > > > > > > >
>> >> >> > > > > > > > > > > Gary
>> >> >> > > > > > > > > > >
>> >> >> > > > > > > > > > > --
>> >> >> > > > > > > > > > > E-Mail: garydgregory@gmail.com |
>> >> ggregory@apache.org
>> >> >> > > > > > > > > > > Java Persistence with Hibernate, Second Edition
>> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
>> >> >> product/1617290459/ref=as_li_
>> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> 9325&creativeASIN=1617290459&
>> >> >> > > > > > > > > >
>> >> >> > > > > > >
>> >> >> > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> cadb800f39946ec62ea2b1af9fe6a2
>> >> >> > > b8>
>> >> >> > > > > > > > > > >
>> >> >> > > > > > > > > > > <http:////
>> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
>> ir?t=garygregory-20&l=am2&o=1&
>> >> a=
>> >> >> > > > > > > > > > 1617290459>
>> >> >> > > > > > > > > > > JUnit in Action, Second Edition
>> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
>> >> >> product/1935182021/ref=as_li_
>> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> 9325&creativeASIN=1935182021&
>> >> >> > > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
>> >> >> > > > > > > > > 18%22
>> >> >> > > > > > > > > > >
>> >> >> > > > > > > > > > >
>> >> >> > > > > > > > > > > <http:////
>> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
>> ir?t=garygregory-20&l=am2&o=1&
>> >> a=
>> >> >> > > > > > > > > > 1935182021>
>> >> >> > > > > > > > > > > Spring Batch in Action
>> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
>> >> >> product/1935182951/ref=as_li_
>> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> 9325&creativeASIN=1935182951&
>> >> >> > > > > > > > > >
>> >> >> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> >> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> >> > > > > > > > > > > <http:////
>> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
>> ir?t=garygregory-20&l=am2&o=1&
>> >> a=
>> >> >> > > > > > > > > > 1935182951>
>> >> >> > > > > > > > > > > Blog: http://garygregory.wordpress.com
>> >> >> > > > > > > > > > > Home: http://garygregory.com/
>> >> >> > > > > > > > > > > Tweet! http://twitter.com/GaryGregory
>> >> >> > > > > > > > > >
>> >> >> > > > > > > > > >
>> >> >> > ------------------------------------------------------------
>> >> >> > > > > > > ---------
>> >> >> > > > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.
>> >> >> apache.org
>> >> >> > > > > > > > > > For additional commands, e-mail:
>> >> >> > dev-help@commons.apache.org
>> >> >> > > > > > > > > >
>> >> >> > > > > > > > > >
>> >> >> > > > > > > > >
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > --
>> >> >> > > > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> >> >> > > > > > > > > Java Persistence with Hibernate, Second Edition
>> >> >> > > > > > > > > <https://www.amazon.com/gp/
>> >> product/1617290459/ref=as_li_
>> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> 9325&creativeASIN=1617290459&
>> >> >> > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> > > > > > cadb800f39946ec62ea2b1af9fe6a2
>> >> >> > > > > > > b8>
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> >> > > > > > garygregory-20&l=am2&o=1&a=
>> >> >> > > > > > > > > 1617290459>
>> >> >> > > > > > > > > JUnit in Action, Second Edition
>> >> >> > > > > > > > > <https://www.amazon.com/gp/
>> >> product/1935182021/ref=as_li_
>> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> 9325&creativeASIN=1935182021&
>> >> >> > > > > > > > >
>> >> >> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> > > > 31ecd1f6b6d1eaf8886ac902a24de4
>> >> >> > > > > > 18%22
>> >> >> > > > > > > > > >
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> >> > > > > > garygregory-20&l=am2&o=1&a=
>> >> >> > > > > > > > > 1935182021>
>> >> >> > > > > > > > > Spring Batch in Action
>> >> >> > > > > > > > > <https://www.amazon.com/gp/
>> >> product/1935182951/ref=as_li_
>> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> >> 9325&creativeASIN=1935182951&
>> >> >> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
>> >> >> tag=garygregory-20&linkId=%7B%
>> >> >> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> >> > > > > > garygregory-20&l=am2&o=1&a=
>> >> >> > > > > > > > > 1935182951>
>> >> >> > > > > > > > > Blog: http://garygregory.wordpress.com
>> >> >> > > > > > > > > Home: http://garygregory.com/
>> >> >> > > > > > > > > Tweet! http://twitter.com/GaryGregory
>> >> >> > > > > > > > >
>> >> >> > > > > > > >
>> >> >> > > > > > > >
>> >> >> > > > > > > >
>> >> >> > > > > > > > --
>> >> >> > > > > > > > Matt Sicker <bo...@gmail.com>
>> >> >> > > > > > >
>> >> >> > > > > >
>> >> >> > > > > >
>> >> >> > > > > >
>> >> >> > > > > > --
>> >> >> > > > > > Matt Sicker <bo...@gmail.com>
>> >> >> > > > > >
>> >> >> > > > >
>> >> >> > > > >
>> >> >> > > > >
>> >> >> > > > > --
>> >> >> > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> >> >> > > > > Java Persistence with Hibernate, Second Edition
>> >> >> > > > > <
>> >> >> > > > > https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> >> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> cadb800f39946ec62ea2b1af9fe6a2b8
>> >> >> > > > > >
>> >> >> > > > >
>> >> >> > > > > <http:////
>> >> >> > > > >
>> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> >> a=1617290459
>> >> >> > > >
>> >> >> > > > > JUnit in Action, Second Edition
>> >> >> > > > > <
>> >> >> > > > > https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> >> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> >> 31ecd1f6b6d1eaf8886ac902a24de4
>> >> >> > > 18%22
>> >> >> > > > > >
>> >> >> > > > >
>> >> >> > > > > <http:////
>> >> >> > > > >
>> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> >> a=1935182021
>> >> >> > > >
>> >> >> > > > > Spring Batch in Action
>> >> >> > > > > <
>> >> >> > > > > https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> >> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> >> >> > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> >> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
>> >> >> > > > > >
>> >> >> > > > > <http:////
>> >> >> > > > >
>> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> >> a=1935182951
>> >> >> > > >
>> >> >> > > > > Blog: http://garygregory.wordpress.com
>> >> >> > > > > Home: http://garygregory.com/
>> >> >> > > > > Tweet! http://twitter.com/GaryGregory
>> >> >> > > > >
>> >> >> > > >
>> >> >> > >
>> >> >> > >
>> >> >> > >
>> >> >> > > --
>> >> >> > > Matt Sicker <bo...@gmail.com>
>> >> >> > >
>> >> >> >
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> >> > Java Persistence with Hibernate, Second Edition
>> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> >> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
>> b8>
>> >> >
>> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> garygregory-20&l=am2&o=1&a=
>> >> 1617290459>
>> >> > JUnit in Action, Second Edition
>> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> >> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
>> 18%22
>> >> >
>> >> >
>> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> garygregory-20&l=am2&o=1&a=
>> >> 1935182021>
>> >> > Spring Batch in Action
>> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> garygregory-20&l=am2&o=1&a=
>> >> 1935182951>
>> >> > Blog: http://garygregory.wordpress.com
>> >> > Home: http://garygregory.com/
>> >> > Tweet! http://twitter.com/GaryGregory
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> >> For additional commands, e-mail: dev-help@commons.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > Java Persistence with Hibernate, Second Edition
>> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>> >
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1617290459>
>> > JUnit in Action, Second Edition
>> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
>> >
>> >
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1935182021>
>> > Spring Batch in Action
>> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1935182951>
>> > Blog: http://garygregory.wordpress.com
>> > Home: http://garygregory.com/
>> > Tweet! http://twitter.com/GaryGregory
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory

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


Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
On Sun, Nov 27, 2016 at 3:41 PM, sebb <se...@gmail.com> wrote:

> On 27 November 2016 at 22:31, Gary Gregory <ga...@gmail.com> wrote:
> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <se...@gmail.com> wrote:
> >
> >> On 27 November 2016 at 22:03, Gary Gregory <ga...@gmail.com>
> wrote:
> >> > These annotations are the SAME as have been published all over the
> place,
> >> > so I do not think we need a PR for review. Reviewing the code in the
> repo
> >> > should be enough, but I'm not sure _what_ there is to review really.
> I've
> >> > already posted a link to the sources (a pastebin link). I'll create a
> >> Jira
> >> > of course.
> >>
> >> There is one aspect that needs review: does the annotation belong in
> LANG?
> >> If we want to use the annotation in other components, do they have to
> >> depend on LANG?
> >>
> >
> > No see below and previous messages.
> >
> >
> >> If not, do they all have their own copies?
> >>
> >
> > No.
> >
> >
> >>
> >> And what happens when LANG needs a non-BC release?
> >>
> >
> > What is the issue I am missing?
> >
>
> The package name for the annotation might need to change
> That would be a downstream nuisance.
>

Hi All,

How is that different than changing the package name for any of our other
lang types?

If you want move a package, you have to break BC and we have clear
guidelines for that task.

Since already have a package called org.apache.commons.lang3.concurrent, I
propose we place these annottaions in
org.apache.commons.lang3.concurrent.annotation.


> >>
> >> My expectation for such annotations is that they would be
> >> self-contained (or built-in to the languange, not LANG).
> >>
> >
> > It is _because_ they are NOT built-in the language or JRE that we are
> > proposing they belong in [lang].
> >
> > Since we are providing the annotation with CLASS retention only
> > (initially), there is no hard dependency on [lang] at runtime.
> >
> > Is there some subtlety we are missing?
>
> Yes, the compile-time dependency.
>

No surprise, right? You can't use an annotation without compiling the
source file.


> AFAIK it's not possible to have a Maven compile-only dependency;
> compile-time implies run-time.
>

That's a tooling issue of course which should not invalidate the worthiness
of this feature.

If I am a downstream user of Commons Lang's new annotations, I would need a
Maven scope that says "I need [lang] as a compile time only dependency" I
do not see such a scope on
https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope

Time for a Jira!

I wonder what Gradle offers users in this dept.?

Gary


>
> > Gary
> >
> >
> >> > Gary
> >> >
> >> > On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <br...@apache.org>
> >> wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov. 2016
> um
> >> >> 21:01 Uhr:
> >> >>
> >> >> > So let's start with the CLASS retention annotations first. I'll
> commit
> >> >> > later today.
> >> >> >
> >> >>
> >> >> Maybe create a GitHub PR so people can have a look before it goes to
> >> >> master?
> >> >>
> >> >> Benedikt
> >> >>
> >> >>
> >> >> >
> >> >> > Gary
> >> >> >
> >> >> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <bo...@gmail.com> wrote:
> >> >> >
> >> >> > > I feel like documenting thread safety in such a low level, widely
> >> used
> >> >> > > library like [lang] is a great idea. Whether it uses annotations,
> >> >> > javadocs,
> >> >> > > or some sort of informal javadoc comments isn't too big a deal to
> >> me,
> >> >> but
> >> >> > > providing some guarantees of thread safety or lack thereof would
> be
> >> >> > > invaluable information.
> >> >> > >
> >> >> > > On 27 November 2016 at 07:11, Benedikt Ritter <
> britter@apache.org>
> >> >> > wrote:
> >> >> > >
> >> >> > > > I thought we decided to abstain from documenting thread safety
> >> since
> >> >> it
> >> >> > > > would get outdated quickly anyway.
> >> >> > > >
> >> >> > > > Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov.
> >> 2016
> >> >> um
> >> >> > > > 09:11 Uhr:
> >> >> > > >
> >> >> > > > > But if we then want a runtime version we had an odd packaging
> >> with
> >> >> > > CLASS
> >> >> > > > > retention in .concurrent. and RUNTIME in .concurrent.runtime.
> >> >> > > > >
> >> >> > > > > I might be in YAGNI territory here...
> >> >> > > > >
> >> >> > > > > Gary
> >> >> > > > >
> >> >> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <
> boards@gmail.com
> >> >
> >> >> > > wrote:
> >> >> > > > >
> >> >> > > > > > I think adding the additional clazz/runtime package would
> be a
> >> >> > little
> >> >> > > > > > overkill if you only include one packaging option for now.
> >> >> > > > > >
> >> >> > > > > > On 27 November 2016 at 00:04, Gary Gregory <
> >> >> garydgregory@gmail.com
> >> >> > >
> >> >> > > > > wrote:
> >> >> > > > > >
> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <boards@gmail.com
> >
> >> >> wrote:
> >> >> > > > > > > >
> >> >> > > > > > > > I can think of a couple use cases for runtime retention
> >> for
> >> >> > > thread
> >> >> > > > > > safety
> >> >> > > > > > > > annotations, but they're not specific to commons lang.
> >> >> > > > > > > >
> >> >> > > > > > > > 1. A framework could choose what type of data
> structure or
> >> >> > > > algorithm
> >> >> > > > > to
> >> >> > > > > > > use
> >> >> > > > > > > > at runtime based on the presence of which thread safety
> >> >> > > annotation
> >> >> > > > is
> >> >> > > > > > on.
> >> >> > > > > > > > Same for mutability.
> >> >> > > > > > > > 2. A testing framework could use these annotations to
> try
> >> and
> >> >> > > > > automate
> >> >> > > > > > > some
> >> >> > > > > > > > sort of thread safety tests, though that sounds like a
> >> hard
> >> >> > > problem
> >> >> > > > > to
> >> >> > > > > > > > actually implement.
> >> >> > > > > > > >
> >> >> > > > > > > > However, it'd be easier to just start with class
> retention
> >> >> (or
> >> >> > > > source
> >> >> > > > > > > > retention) just for documentation purposes. Higher
> >> retention
> >> >> > > levels
> >> >> > > > > > could
> >> >> > > > > > > > be added later if an important use case came up.
> >> >> > > > > > >
> >> >> > > > > > > But which packaging option?
> >> >> > > > > > >
> >> >> > > > > > > Gary
> >> >> > > > > > > >
> >> >> > > > > > > > On 26 November 2016 at 19:56, Gary Gregory <
> >> >> > > garydgregory@gmail.com
> >> >> > > > >
> >> >> > > > > > > wrote:
> >> >> > > > > > > >
> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <
> sebbaz@gmail.com
> >> >
> >> >> > > wrote:
> >> >> > > > > > > > >
> >> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> >> >> > > > > garydgregory@gmail.com
> >> >> > > > > > >
> >> >> > > > > > > > > wrote:
> >> >> > > > > > > > > > > On a [crypto] thread, I mentioned
> >> >> > > > http://pastebin.com/RKPGGdJ9
> >> >> > > > > > to
> >> >> > > > > > > add
> >> >> > > > > > > > > > the
> >> >> > > > > > > > > > > "classic" four javax.annotation.concurrent
> >> annotations
> >> >> to
> >> >> > > two
> >> >> > > > > > > packages
> >> >> > > > > > > > > > > (.clazz and .runtime) in Commons Lang for CLASS
> and
> >> >> > RUNTIME
> >> >> > > > > > > retentions.
> >> >> > > > > > > > > > >
> >> >> > > > > > > > > > > You'd use the CLASS version to avoid a hard
> >> dependency
> >> >> on
> >> >> > > > > [lang].
> >> >> > > > > > > > > RUNTIME
> >> >> > > > > > > > > > > to keep them around.
> >> >> > > > > > > > > > >
> >> >> > > > > > > > > > > We'd use the CLASS versions in all of Commons for
> >> >> > > documenting
> >> >> > > > > > > thread
> >> >> > > > > > > > > > safety.
> >> >> > > > > > > > > > >
> >> >> > > > > > > > > > > Thoughts?
> >> >> > > > > > > > > >
> >> >> > > > > > > > > > Definitely Class retention, not Runtime.
> >> >> > > > > > > > > > You don't want to have to include the annotation
> jar
> >> on
> >> >> the
> >> >> > > > > runtime
> >> >> > > > > > > > > > classpath.
> >> >> > > > > > > > > >
> >> >> > > > > > > > >
> >> >> > > > > > > > > Hi Sebb,
> >> >> > > > > > > > >
> >> >> > > > > > > > > Right now I have both of these packages:
> >> >> > > > > > > > >
> >> >> > > > > > > > > - org.apache.commons.lang3.
> annotation.concurrent.clazz
> >> >> > > > > > > > > - org.apache.commons.lang3.
> >> annotation.concurrent.runtime
> >> >> > > > > > > > >
> >> >> > > > > > > > > Each with a copy of:
> >> >> > > > > > > > >
> >> >> > > > > > > > > GuardedBy
> >> >> > > > > > > > > Immutable
> >> >> > > > > > > > > NotThreadSafe
> >> >> > > > > > > > > ThreadSafe
> >> >> > > > > > > > >
> >> >> > > > > > > > > Should we include what I have as is?
> >> >> > > > > > > > >
> >> >> > > > > > > > > If we were to only provide the annotation at the
> CLASS
> >> >> > > retention
> >> >> > > > > > level,
> >> >> > > > > > > > > should we still package them in
> >> >> > ...annotation.concurrent.clazz
> >> >> > > in
> >> >> > > > > > case
> >> >> > > > > > > we
> >> >> > > > > > > > > want to provide annotation.concurrent.runtime later?
> >> >> > > > > > > > >
> >> >> > > > > > > > > If we know for certain we never want to provide
> RUNTIME
> >> >> > > > retention,
> >> >> > > > > we
> >> >> > > > > > > can
> >> >> > > > > > > > > put them all in annotation.concurrent now.
> >> >> > > > > > > > >
> >> >> > > > > > > > > Thoughts?
> >> >> > > > > > > > >
> >> >> > > > > > > > > Gary
> >> >> > > > > > > > >
> >> >> > > > > > > > >
> >> >> > > > > > > > >
> >> >> > > > > > > > > > [I don't know why the annotations were ever
> considered
> >> >> > > suitable
> >> >> > > > > for
> >> >> > > > > > > > > > runtime]
> >> >> > > > > > > > > >
> >> >> > > > > > > > > > > Gary
> >> >> > > > > > > > > > >
> >> >> > > > > > > > > > > --
> >> >> > > > > > > > > > > E-Mail: garydgregory@gmail.com |
> >> ggregory@apache.org
> >> >> > > > > > > > > > > Java Persistence with Hibernate, Second Edition
> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> >> >> product/1617290459/ref=as_li_
> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> 9325&creativeASIN=1617290459&
> >> >> > > > > > > > > >
> >> >> > > > > > >
> >> >> > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> cadb800f39946ec62ea2b1af9fe6a2
> >> >> > > b8>
> >> >> > > > > > > > > > >
> >> >> > > > > > > > > > > <http:////
> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> ir?t=garygregory-20&l=am2&o=1&
> >> a=
> >> >> > > > > > > > > > 1617290459>
> >> >> > > > > > > > > > > JUnit in Action, Second Edition
> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> >> >> product/1935182021/ref=as_li_
> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> 9325&creativeASIN=1935182021&
> >> >> > > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> >> >> > > > > > > > > 18%22
> >> >> > > > > > > > > > >
> >> >> > > > > > > > > > >
> >> >> > > > > > > > > > > <http:////
> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> ir?t=garygregory-20&l=am2&o=1&
> >> a=
> >> >> > > > > > > > > > 1935182021>
> >> >> > > > > > > > > > > Spring Batch in Action
> >> >> > > > > > > > > > > <https://www.amazon.com/gp/
> >> >> product/1935182951/ref=as_li_
> >> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> 9325&creativeASIN=1935182951&
> >> >> > > > > > > > > >
> >> >> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >> >> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> >> > > > > > > > > > > <http:////
> >> >> > > > > > > ir-na.amazon-adsystem.com/e/
> ir?t=garygregory-20&l=am2&o=1&
> >> a=
> >> >> > > > > > > > > > 1935182951>
> >> >> > > > > > > > > > > Blog: http://garygregory.wordpress.com
> >> >> > > > > > > > > > > Home: http://garygregory.com/
> >> >> > > > > > > > > > > Tweet! http://twitter.com/GaryGregory
> >> >> > > > > > > > > >
> >> >> > > > > > > > > >
> >> >> > ------------------------------------------------------------
> >> >> > > > > > > ---------
> >> >> > > > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.
> >> >> apache.org
> >> >> > > > > > > > > > For additional commands, e-mail:
> >> >> > dev-help@commons.apache.org
> >> >> > > > > > > > > >
> >> >> > > > > > > > > >
> >> >> > > > > > > > >
> >> >> > > > > > > > >
> >> >> > > > > > > > > --
> >> >> > > > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >> >> > > > > > > > > Java Persistence with Hibernate, Second Edition
> >> >> > > > > > > > > <https://www.amazon.com/gp/
> >> product/1617290459/ref=as_li_
> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> 9325&creativeASIN=1617290459&
> >> >> > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> > > > > > cadb800f39946ec62ea2b1af9fe6a2
> >> >> > > > > > > b8>
> >> >> > > > > > > > >
> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> >> >> > > > > > > > > 1617290459>
> >> >> > > > > > > > > JUnit in Action, Second Edition
> >> >> > > > > > > > > <https://www.amazon.com/gp/
> >> product/1935182021/ref=as_li_
> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> 9325&creativeASIN=1935182021&
> >> >> > > > > > > > >
> >> >> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> > > > 31ecd1f6b6d1eaf8886ac902a24de4
> >> >> > > > > > 18%22
> >> >> > > > > > > > > >
> >> >> > > > > > > > >
> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> >> >> > > > > > > > > 1935182021>
> >> >> > > > > > > > > Spring Batch in Action
> >> >> > > > > > > > > <https://www.amazon.com/gp/
> >> product/1935182951/ref=as_li_
> >> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> >> 9325&creativeASIN=1935182951&
> >> >> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
> >> >> tag=garygregory-20&linkId=%7B%
> >> >> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> >> > > > > > garygregory-20&l=am2&o=1&a=
> >> >> > > > > > > > > 1935182951>
> >> >> > > > > > > > > Blog: http://garygregory.wordpress.com
> >> >> > > > > > > > > Home: http://garygregory.com/
> >> >> > > > > > > > > Tweet! http://twitter.com/GaryGregory
> >> >> > > > > > > > >
> >> >> > > > > > > >
> >> >> > > > > > > >
> >> >> > > > > > > >
> >> >> > > > > > > > --
> >> >> > > > > > > > Matt Sicker <bo...@gmail.com>
> >> >> > > > > > >
> >> >> > > > > >
> >> >> > > > > >
> >> >> > > > > >
> >> >> > > > > > --
> >> >> > > > > > Matt Sicker <bo...@gmail.com>
> >> >> > > > > >
> >> >> > > > >
> >> >> > > > >
> >> >> > > > >
> >> >> > > > > --
> >> >> > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >> >> > > > > Java Persistence with Hibernate, Second Edition
> >> >> > > > > <
> >> >> > > > > https://www.amazon.com/gp/product/1617290459/ref=as_li_
> >> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> cadb800f39946ec62ea2b1af9fe6a2b8
> >> >> > > > > >
> >> >> > > > >
> >> >> > > > > <http:////
> >> >> > > > >
> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> >> a=1617290459
> >> >> > > >
> >> >> > > > > JUnit in Action, Second Edition
> >> >> > > > > <
> >> >> > > > > https://www.amazon.com/gp/product/1935182021/ref=as_li_
> >> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> >> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> >> >> 31ecd1f6b6d1eaf8886ac902a24de4
> >> >> > > 18%22
> >> >> > > > > >
> >> >> > > > >
> >> >> > > > > <http:////
> >> >> > > > >
> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> >> a=1935182021
> >> >> > > >
> >> >> > > > > Spring Batch in Action
> >> >> > > > > <
> >> >> > > > > https://www.amazon.com/gp/product/1935182951/ref=as_li_
> >> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> >> >> > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >> >> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> >> >> > > > > >
> >> >> > > > > <http:////
> >> >> > > > >
> >> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> >> a=1935182951
> >> >> > > >
> >> >> > > > > Blog: http://garygregory.wordpress.com
> >> >> > > > > Home: http://garygregory.com/
> >> >> > > > > Tweet! http://twitter.com/GaryGregory
> >> >> > > > >
> >> >> > > >
> >> >> > >
> >> >> > >
> >> >> > >
> >> >> > > --
> >> >> > > Matt Sicker <bo...@gmail.com>
> >> >> > >
> >> >> >
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >> > Java Persistence with Hibernate, Second Edition
> >> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> >> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
> b8>
> >> >
> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> >> 1617290459>
> >> > JUnit in Action, Second Edition
> >> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> >> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> 18%22
> >> >
> >> >
> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> >> 1935182021>
> >> > Spring Batch in Action
> >> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> >> 1935182951>
> >> > Blog: http://garygregory.wordpress.com
> >> > Home: http://garygregory.com/
> >> > Tweet! http://twitter.com/GaryGregory
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >> For additional commands, e-mail: dev-help@commons.apache.org
> >>
> >>
> >
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > Java Persistence with Hibernate, Second Edition
> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> > JUnit in Action, Second Edition
> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> > Spring Batch in Action
> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] Thread safety annotations

Posted by sebb <se...@gmail.com>.
On 27 November 2016 at 22:31, Gary Gregory <ga...@gmail.com> wrote:
> On Sun, Nov 27, 2016 at 2:14 PM, sebb <se...@gmail.com> wrote:
>
>> On 27 November 2016 at 22:03, Gary Gregory <ga...@gmail.com> wrote:
>> > These annotations are the SAME as have been published all over the place,
>> > so I do not think we need a PR for review. Reviewing the code in the repo
>> > should be enough, but I'm not sure _what_ there is to review really. I've
>> > already posted a link to the sources (a pastebin link). I'll create a
>> Jira
>> > of course.
>>
>> There is one aspect that needs review: does the annotation belong in LANG?
>> If we want to use the annotation in other components, do they have to
>> depend on LANG?
>>
>
> No see below and previous messages.
>
>
>> If not, do they all have their own copies?
>>
>
> No.
>
>
>>
>> And what happens when LANG needs a non-BC release?
>>
>
> What is the issue I am missing?
>

The package name for the annotation might need to change
That would be a downstream nuisance.

>>
>> My expectation for such annotations is that they would be
>> self-contained (or built-in to the languange, not LANG).
>>
>
> It is _because_ they are NOT built-in the language or JRE that we are
> proposing they belong in [lang].
>
> Since we are providing the annotation with CLASS retention only
> (initially), there is no hard dependency on [lang] at runtime.
>
> Is there some subtlety we are missing?

Yes, the compile-time dependency.

AFAIK it's not possible to have a Maven compile-only dependency;
compile-time implies run-time.

> Gary
>
>
>> > Gary
>> >
>> > On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <br...@apache.org>
>> wrote:
>> >
>> >> Hi,
>> >>
>> >> Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov. 2016 um
>> >> 21:01 Uhr:
>> >>
>> >> > So let's start with the CLASS retention annotations first. I'll commit
>> >> > later today.
>> >> >
>> >>
>> >> Maybe create a GitHub PR so people can have a look before it goes to
>> >> master?
>> >>
>> >> Benedikt
>> >>
>> >>
>> >> >
>> >> > Gary
>> >> >
>> >> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <bo...@gmail.com> wrote:
>> >> >
>> >> > > I feel like documenting thread safety in such a low level, widely
>> used
>> >> > > library like [lang] is a great idea. Whether it uses annotations,
>> >> > javadocs,
>> >> > > or some sort of informal javadoc comments isn't too big a deal to
>> me,
>> >> but
>> >> > > providing some guarantees of thread safety or lack thereof would be
>> >> > > invaluable information.
>> >> > >
>> >> > > On 27 November 2016 at 07:11, Benedikt Ritter <br...@apache.org>
>> >> > wrote:
>> >> > >
>> >> > > > I thought we decided to abstain from documenting thread safety
>> since
>> >> it
>> >> > > > would get outdated quickly anyway.
>> >> > > >
>> >> > > > Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov.
>> 2016
>> >> um
>> >> > > > 09:11 Uhr:
>> >> > > >
>> >> > > > > But if we then want a runtime version we had an odd packaging
>> with
>> >> > > CLASS
>> >> > > > > retention in .concurrent. and RUNTIME in .concurrent.runtime.
>> >> > > > >
>> >> > > > > I might be in YAGNI territory here...
>> >> > > > >
>> >> > > > > Gary
>> >> > > > >
>> >> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <boards@gmail.com
>> >
>> >> > > wrote:
>> >> > > > >
>> >> > > > > > I think adding the additional clazz/runtime package would be a
>> >> > little
>> >> > > > > > overkill if you only include one packaging option for now.
>> >> > > > > >
>> >> > > > > > On 27 November 2016 at 00:04, Gary Gregory <
>> >> garydgregory@gmail.com
>> >> > >
>> >> > > > > wrote:
>> >> > > > > >
>> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <bo...@gmail.com>
>> >> wrote:
>> >> > > > > > > >
>> >> > > > > > > > I can think of a couple use cases for runtime retention
>> for
>> >> > > thread
>> >> > > > > > safety
>> >> > > > > > > > annotations, but they're not specific to commons lang.
>> >> > > > > > > >
>> >> > > > > > > > 1. A framework could choose what type of data structure or
>> >> > > > algorithm
>> >> > > > > to
>> >> > > > > > > use
>> >> > > > > > > > at runtime based on the presence of which thread safety
>> >> > > annotation
>> >> > > > is
>> >> > > > > > on.
>> >> > > > > > > > Same for mutability.
>> >> > > > > > > > 2. A testing framework could use these annotations to try
>> and
>> >> > > > > automate
>> >> > > > > > > some
>> >> > > > > > > > sort of thread safety tests, though that sounds like a
>> hard
>> >> > > problem
>> >> > > > > to
>> >> > > > > > > > actually implement.
>> >> > > > > > > >
>> >> > > > > > > > However, it'd be easier to just start with class retention
>> >> (or
>> >> > > > source
>> >> > > > > > > > retention) just for documentation purposes. Higher
>> retention
>> >> > > levels
>> >> > > > > > could
>> >> > > > > > > > be added later if an important use case came up.
>> >> > > > > > >
>> >> > > > > > > But which packaging option?
>> >> > > > > > >
>> >> > > > > > > Gary
>> >> > > > > > > >
>> >> > > > > > > > On 26 November 2016 at 19:56, Gary Gregory <
>> >> > > garydgregory@gmail.com
>> >> > > > >
>> >> > > > > > > wrote:
>> >> > > > > > > >
>> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <sebbaz@gmail.com
>> >
>> >> > > wrote:
>> >> > > > > > > > >
>> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
>> >> > > > > garydgregory@gmail.com
>> >> > > > > > >
>> >> > > > > > > > > wrote:
>> >> > > > > > > > > > > On a [crypto] thread, I mentioned
>> >> > > > http://pastebin.com/RKPGGdJ9
>> >> > > > > > to
>> >> > > > > > > add
>> >> > > > > > > > > > the
>> >> > > > > > > > > > > "classic" four javax.annotation.concurrent
>> annotations
>> >> to
>> >> > > two
>> >> > > > > > > packages
>> >> > > > > > > > > > > (.clazz and .runtime) in Commons Lang for CLASS and
>> >> > RUNTIME
>> >> > > > > > > retentions.
>> >> > > > > > > > > > >
>> >> > > > > > > > > > > You'd use the CLASS version to avoid a hard
>> dependency
>> >> on
>> >> > > > > [lang].
>> >> > > > > > > > > RUNTIME
>> >> > > > > > > > > > > to keep them around.
>> >> > > > > > > > > > >
>> >> > > > > > > > > > > We'd use the CLASS versions in all of Commons for
>> >> > > documenting
>> >> > > > > > > thread
>> >> > > > > > > > > > safety.
>> >> > > > > > > > > > >
>> >> > > > > > > > > > > Thoughts?
>> >> > > > > > > > > >
>> >> > > > > > > > > > Definitely Class retention, not Runtime.
>> >> > > > > > > > > > You don't want to have to include the annotation jar
>> on
>> >> the
>> >> > > > > runtime
>> >> > > > > > > > > > classpath.
>> >> > > > > > > > > >
>> >> > > > > > > > >
>> >> > > > > > > > > Hi Sebb,
>> >> > > > > > > > >
>> >> > > > > > > > > Right now I have both of these packages:
>> >> > > > > > > > >
>> >> > > > > > > > > - org.apache.commons.lang3.annotation.concurrent.clazz
>> >> > > > > > > > > - org.apache.commons.lang3.
>> annotation.concurrent.runtime
>> >> > > > > > > > >
>> >> > > > > > > > > Each with a copy of:
>> >> > > > > > > > >
>> >> > > > > > > > > GuardedBy
>> >> > > > > > > > > Immutable
>> >> > > > > > > > > NotThreadSafe
>> >> > > > > > > > > ThreadSafe
>> >> > > > > > > > >
>> >> > > > > > > > > Should we include what I have as is?
>> >> > > > > > > > >
>> >> > > > > > > > > If we were to only provide the annotation at the CLASS
>> >> > > retention
>> >> > > > > > level,
>> >> > > > > > > > > should we still package them in
>> >> > ...annotation.concurrent.clazz
>> >> > > in
>> >> > > > > > case
>> >> > > > > > > we
>> >> > > > > > > > > want to provide annotation.concurrent.runtime later?
>> >> > > > > > > > >
>> >> > > > > > > > > If we know for certain we never want to provide RUNTIME
>> >> > > > retention,
>> >> > > > > we
>> >> > > > > > > can
>> >> > > > > > > > > put them all in annotation.concurrent now.
>> >> > > > > > > > >
>> >> > > > > > > > > Thoughts?
>> >> > > > > > > > >
>> >> > > > > > > > > Gary
>> >> > > > > > > > >
>> >> > > > > > > > >
>> >> > > > > > > > >
>> >> > > > > > > > > > [I don't know why the annotations were ever considered
>> >> > > suitable
>> >> > > > > for
>> >> > > > > > > > > > runtime]
>> >> > > > > > > > > >
>> >> > > > > > > > > > > Gary
>> >> > > > > > > > > > >
>> >> > > > > > > > > > > --
>> >> > > > > > > > > > > E-Mail: garydgregory@gmail.com |
>> ggregory@apache.org
>> >> > > > > > > > > > > Java Persistence with Hibernate, Second Edition
>> >> > > > > > > > > > > <https://www.amazon.com/gp/
>> >> product/1617290459/ref=as_li_
>> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> 9325&creativeASIN=1617290459&
>> >> > > > > > > > > >
>> >> > > > > > >
>> >> > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> cadb800f39946ec62ea2b1af9fe6a2
>> >> > > b8>
>> >> > > > > > > > > > >
>> >> > > > > > > > > > > <http:////
>> >> > > > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> a=
>> >> > > > > > > > > > 1617290459>
>> >> > > > > > > > > > > JUnit in Action, Second Edition
>> >> > > > > > > > > > > <https://www.amazon.com/gp/
>> >> product/1935182021/ref=as_li_
>> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> 9325&creativeASIN=1935182021&
>> >> > > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
>> >> > > > > > > > > 18%22
>> >> > > > > > > > > > >
>> >> > > > > > > > > > >
>> >> > > > > > > > > > > <http:////
>> >> > > > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> a=
>> >> > > > > > > > > > 1935182021>
>> >> > > > > > > > > > > Spring Batch in Action
>> >> > > > > > > > > > > <https://www.amazon.com/gp/
>> >> product/1935182951/ref=as_li_
>> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> 9325&creativeASIN=1935182951&
>> >> > > > > > > > > >
>> >> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> > > > > > > > > > > <http:////
>> >> > > > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> a=
>> >> > > > > > > > > > 1935182951>
>> >> > > > > > > > > > > Blog: http://garygregory.wordpress.com
>> >> > > > > > > > > > > Home: http://garygregory.com/
>> >> > > > > > > > > > > Tweet! http://twitter.com/GaryGregory
>> >> > > > > > > > > >
>> >> > > > > > > > > >
>> >> > ------------------------------------------------------------
>> >> > > > > > > ---------
>> >> > > > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.
>> >> apache.org
>> >> > > > > > > > > > For additional commands, e-mail:
>> >> > dev-help@commons.apache.org
>> >> > > > > > > > > >
>> >> > > > > > > > > >
>> >> > > > > > > > >
>> >> > > > > > > > >
>> >> > > > > > > > > --
>> >> > > > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> >> > > > > > > > > Java Persistence with Hibernate, Second Edition
>> >> > > > > > > > > <https://www.amazon.com/gp/
>> product/1617290459/ref=as_li_
>> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> 9325&creativeASIN=1617290459&
>> >> > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> > > > > > cadb800f39946ec62ea2b1af9fe6a2
>> >> > > > > > > b8>
>> >> > > > > > > > >
>> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> > > > > > garygregory-20&l=am2&o=1&a=
>> >> > > > > > > > > 1617290459>
>> >> > > > > > > > > JUnit in Action, Second Edition
>> >> > > > > > > > > <https://www.amazon.com/gp/
>> product/1935182021/ref=as_li_
>> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> 9325&creativeASIN=1935182021&
>> >> > > > > > > > >
>> >> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> > > > 31ecd1f6b6d1eaf8886ac902a24de4
>> >> > > > > > 18%22
>> >> > > > > > > > > >
>> >> > > > > > > > >
>> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> > > > > > garygregory-20&l=am2&o=1&a=
>> >> > > > > > > > > 1935182021>
>> >> > > > > > > > > Spring Batch in Action
>> >> > > > > > > > > <https://www.amazon.com/gp/
>> product/1935182951/ref=as_li_
>> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> >> 9325&creativeASIN=1935182951&
>> >> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
>> >> tag=garygregory-20&linkId=%7B%
>> >> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> > > > > > garygregory-20&l=am2&o=1&a=
>> >> > > > > > > > > 1935182951>
>> >> > > > > > > > > Blog: http://garygregory.wordpress.com
>> >> > > > > > > > > Home: http://garygregory.com/
>> >> > > > > > > > > Tweet! http://twitter.com/GaryGregory
>> >> > > > > > > > >
>> >> > > > > > > >
>> >> > > > > > > >
>> >> > > > > > > >
>> >> > > > > > > > --
>> >> > > > > > > > Matt Sicker <bo...@gmail.com>
>> >> > > > > > >
>> >> > > > > >
>> >> > > > > >
>> >> > > > > >
>> >> > > > > > --
>> >> > > > > > Matt Sicker <bo...@gmail.com>
>> >> > > > > >
>> >> > > > >
>> >> > > > >
>> >> > > > >
>> >> > > > > --
>> >> > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> >> > > > > Java Persistence with Hibernate, Second Edition
>> >> > > > > <
>> >> > > > > https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> >> > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> cadb800f39946ec62ea2b1af9fe6a2b8
>> >> > > > > >
>> >> > > > >
>> >> > > > > <http:////
>> >> > > > >
>> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> a=1617290459
>> >> > > >
>> >> > > > > JUnit in Action, Second Edition
>> >> > > > > <
>> >> > > > > https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> >> > > > linkCode=as2&tag=garygregory-20&linkId=
>> >> 31ecd1f6b6d1eaf8886ac902a24de4
>> >> > > 18%22
>> >> > > > > >
>> >> > > > >
>> >> > > > > <http:////
>> >> > > > >
>> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> a=1935182021
>> >> > > >
>> >> > > > > Spring Batch in Action
>> >> > > > > <
>> >> > > > > https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> >> > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
>> >> > > > > >
>> >> > > > > <http:////
>> >> > > > >
>> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> a=1935182951
>> >> > > >
>> >> > > > > Blog: http://garygregory.wordpress.com
>> >> > > > > Home: http://garygregory.com/
>> >> > > > > Tweet! http://twitter.com/GaryGregory
>> >> > > > >
>> >> > > >
>> >> > >
>> >> > >
>> >> > >
>> >> > > --
>> >> > > Matt Sicker <bo...@gmail.com>
>> >> > >
>> >> >
>> >>
>> >
>> >
>> >
>> > --
>> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > Java Persistence with Hibernate, Second Edition
>> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>> >
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1617290459>
>> > JUnit in Action, Second Edition
>> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
>> >
>> >
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1935182021>
>> > Spring Batch in Action
>> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1935182951>
>> > Blog: http://garygregory.wordpress.com
>> > Home: http://garygregory.com/
>> > Tweet! http://twitter.com/GaryGregory
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory

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


Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
On Sun, Nov 27, 2016 at 2:14 PM, sebb <se...@gmail.com> wrote:

> On 27 November 2016 at 22:03, Gary Gregory <ga...@gmail.com> wrote:
> > These annotations are the SAME as have been published all over the place,
> > so I do not think we need a PR for review. Reviewing the code in the repo
> > should be enough, but I'm not sure _what_ there is to review really. I've
> > already posted a link to the sources (a pastebin link). I'll create a
> Jira
> > of course.
>
> There is one aspect that needs review: does the annotation belong in LANG?
> If we want to use the annotation in other components, do they have to
> depend on LANG?
>

No see below and previous messages.


> If not, do they all have their own copies?
>

No.


>
> And what happens when LANG needs a non-BC release?
>

What is the issue I am missing?


>
> My expectation for such annotations is that they would be
> self-contained (or built-in to the languange, not LANG).
>

It is _because_ they are NOT built-in the language or JRE that we are
proposing they belong in [lang].

Since we are providing the annotation with CLASS retention only
(initially), there is no hard dependency on [lang] at runtime.

Is there some subtlety we are missing?

Gary


> > Gary
> >
> > On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <br...@apache.org>
> wrote:
> >
> >> Hi,
> >>
> >> Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov. 2016 um
> >> 21:01 Uhr:
> >>
> >> > So let's start with the CLASS retention annotations first. I'll commit
> >> > later today.
> >> >
> >>
> >> Maybe create a GitHub PR so people can have a look before it goes to
> >> master?
> >>
> >> Benedikt
> >>
> >>
> >> >
> >> > Gary
> >> >
> >> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <bo...@gmail.com> wrote:
> >> >
> >> > > I feel like documenting thread safety in such a low level, widely
> used
> >> > > library like [lang] is a great idea. Whether it uses annotations,
> >> > javadocs,
> >> > > or some sort of informal javadoc comments isn't too big a deal to
> me,
> >> but
> >> > > providing some guarantees of thread safety or lack thereof would be
> >> > > invaluable information.
> >> > >
> >> > > On 27 November 2016 at 07:11, Benedikt Ritter <br...@apache.org>
> >> > wrote:
> >> > >
> >> > > > I thought we decided to abstain from documenting thread safety
> since
> >> it
> >> > > > would get outdated quickly anyway.
> >> > > >
> >> > > > Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov.
> 2016
> >> um
> >> > > > 09:11 Uhr:
> >> > > >
> >> > > > > But if we then want a runtime version we had an odd packaging
> with
> >> > > CLASS
> >> > > > > retention in .concurrent. and RUNTIME in .concurrent.runtime.
> >> > > > >
> >> > > > > I might be in YAGNI territory here...
> >> > > > >
> >> > > > > Gary
> >> > > > >
> >> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <boards@gmail.com
> >
> >> > > wrote:
> >> > > > >
> >> > > > > > I think adding the additional clazz/runtime package would be a
> >> > little
> >> > > > > > overkill if you only include one packaging option for now.
> >> > > > > >
> >> > > > > > On 27 November 2016 at 00:04, Gary Gregory <
> >> garydgregory@gmail.com
> >> > >
> >> > > > > wrote:
> >> > > > > >
> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <bo...@gmail.com>
> >> wrote:
> >> > > > > > > >
> >> > > > > > > > I can think of a couple use cases for runtime retention
> for
> >> > > thread
> >> > > > > > safety
> >> > > > > > > > annotations, but they're not specific to commons lang.
> >> > > > > > > >
> >> > > > > > > > 1. A framework could choose what type of data structure or
> >> > > > algorithm
> >> > > > > to
> >> > > > > > > use
> >> > > > > > > > at runtime based on the presence of which thread safety
> >> > > annotation
> >> > > > is
> >> > > > > > on.
> >> > > > > > > > Same for mutability.
> >> > > > > > > > 2. A testing framework could use these annotations to try
> and
> >> > > > > automate
> >> > > > > > > some
> >> > > > > > > > sort of thread safety tests, though that sounds like a
> hard
> >> > > problem
> >> > > > > to
> >> > > > > > > > actually implement.
> >> > > > > > > >
> >> > > > > > > > However, it'd be easier to just start with class retention
> >> (or
> >> > > > source
> >> > > > > > > > retention) just for documentation purposes. Higher
> retention
> >> > > levels
> >> > > > > > could
> >> > > > > > > > be added later if an important use case came up.
> >> > > > > > >
> >> > > > > > > But which packaging option?
> >> > > > > > >
> >> > > > > > > Gary
> >> > > > > > > >
> >> > > > > > > > On 26 November 2016 at 19:56, Gary Gregory <
> >> > > garydgregory@gmail.com
> >> > > > >
> >> > > > > > > wrote:
> >> > > > > > > >
> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <sebbaz@gmail.com
> >
> >> > > wrote:
> >> > > > > > > > >
> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> >> > > > > garydgregory@gmail.com
> >> > > > > > >
> >> > > > > > > > > wrote:
> >> > > > > > > > > > > On a [crypto] thread, I mentioned
> >> > > > http://pastebin.com/RKPGGdJ9
> >> > > > > > to
> >> > > > > > > add
> >> > > > > > > > > > the
> >> > > > > > > > > > > "classic" four javax.annotation.concurrent
> annotations
> >> to
> >> > > two
> >> > > > > > > packages
> >> > > > > > > > > > > (.clazz and .runtime) in Commons Lang for CLASS and
> >> > RUNTIME
> >> > > > > > > retentions.
> >> > > > > > > > > > >
> >> > > > > > > > > > > You'd use the CLASS version to avoid a hard
> dependency
> >> on
> >> > > > > [lang].
> >> > > > > > > > > RUNTIME
> >> > > > > > > > > > > to keep them around.
> >> > > > > > > > > > >
> >> > > > > > > > > > > We'd use the CLASS versions in all of Commons for
> >> > > documenting
> >> > > > > > > thread
> >> > > > > > > > > > safety.
> >> > > > > > > > > > >
> >> > > > > > > > > > > Thoughts?
> >> > > > > > > > > >
> >> > > > > > > > > > Definitely Class retention, not Runtime.
> >> > > > > > > > > > You don't want to have to include the annotation jar
> on
> >> the
> >> > > > > runtime
> >> > > > > > > > > > classpath.
> >> > > > > > > > > >
> >> > > > > > > > >
> >> > > > > > > > > Hi Sebb,
> >> > > > > > > > >
> >> > > > > > > > > Right now I have both of these packages:
> >> > > > > > > > >
> >> > > > > > > > > - org.apache.commons.lang3.annotation.concurrent.clazz
> >> > > > > > > > > - org.apache.commons.lang3.
> annotation.concurrent.runtime
> >> > > > > > > > >
> >> > > > > > > > > Each with a copy of:
> >> > > > > > > > >
> >> > > > > > > > > GuardedBy
> >> > > > > > > > > Immutable
> >> > > > > > > > > NotThreadSafe
> >> > > > > > > > > ThreadSafe
> >> > > > > > > > >
> >> > > > > > > > > Should we include what I have as is?
> >> > > > > > > > >
> >> > > > > > > > > If we were to only provide the annotation at the CLASS
> >> > > retention
> >> > > > > > level,
> >> > > > > > > > > should we still package them in
> >> > ...annotation.concurrent.clazz
> >> > > in
> >> > > > > > case
> >> > > > > > > we
> >> > > > > > > > > want to provide annotation.concurrent.runtime later?
> >> > > > > > > > >
> >> > > > > > > > > If we know for certain we never want to provide RUNTIME
> >> > > > retention,
> >> > > > > we
> >> > > > > > > can
> >> > > > > > > > > put them all in annotation.concurrent now.
> >> > > > > > > > >
> >> > > > > > > > > Thoughts?
> >> > > > > > > > >
> >> > > > > > > > > Gary
> >> > > > > > > > >
> >> > > > > > > > >
> >> > > > > > > > >
> >> > > > > > > > > > [I don't know why the annotations were ever considered
> >> > > suitable
> >> > > > > for
> >> > > > > > > > > > runtime]
> >> > > > > > > > > >
> >> > > > > > > > > > > Gary
> >> > > > > > > > > > >
> >> > > > > > > > > > > --
> >> > > > > > > > > > > E-Mail: garydgregory@gmail.com |
> ggregory@apache.org
> >> > > > > > > > > > > Java Persistence with Hibernate, Second Edition
> >> > > > > > > > > > > <https://www.amazon.com/gp/
> >> product/1617290459/ref=as_li_
> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> 9325&creativeASIN=1617290459&
> >> > > > > > > > > >
> >> > > > > > >
> >> > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> cadb800f39946ec62ea2b1af9fe6a2
> >> > > b8>
> >> > > > > > > > > > >
> >> > > > > > > > > > > <http:////
> >> > > > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> a=
> >> > > > > > > > > > 1617290459>
> >> > > > > > > > > > > JUnit in Action, Second Edition
> >> > > > > > > > > > > <https://www.amazon.com/gp/
> >> product/1935182021/ref=as_li_
> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> 9325&creativeASIN=1935182021&
> >> > > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> >> > > > > > > > > 18%22
> >> > > > > > > > > > >
> >> > > > > > > > > > >
> >> > > > > > > > > > > <http:////
> >> > > > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> a=
> >> > > > > > > > > > 1935182021>
> >> > > > > > > > > > > Spring Batch in Action
> >> > > > > > > > > > > <https://www.amazon.com/gp/
> >> product/1935182951/ref=as_li_
> >> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> 9325&creativeASIN=1935182951&
> >> > > > > > > > > >
> >> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> > > > > > > > > > > <http:////
> >> > > > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> a=
> >> > > > > > > > > > 1935182951>
> >> > > > > > > > > > > Blog: http://garygregory.wordpress.com
> >> > > > > > > > > > > Home: http://garygregory.com/
> >> > > > > > > > > > > Tweet! http://twitter.com/GaryGregory
> >> > > > > > > > > >
> >> > > > > > > > > >
> >> > ------------------------------------------------------------
> >> > > > > > > ---------
> >> > > > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.
> >> apache.org
> >> > > > > > > > > > For additional commands, e-mail:
> >> > dev-help@commons.apache.org
> >> > > > > > > > > >
> >> > > > > > > > > >
> >> > > > > > > > >
> >> > > > > > > > >
> >> > > > > > > > > --
> >> > > > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >> > > > > > > > > Java Persistence with Hibernate, Second Edition
> >> > > > > > > > > <https://www.amazon.com/gp/
> product/1617290459/ref=as_li_
> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> 9325&creativeASIN=1617290459&
> >> > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> > > > > > cadb800f39946ec62ea2b1af9fe6a2
> >> > > > > > > b8>
> >> > > > > > > > >
> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> > > > > > garygregory-20&l=am2&o=1&a=
> >> > > > > > > > > 1617290459>
> >> > > > > > > > > JUnit in Action, Second Edition
> >> > > > > > > > > <https://www.amazon.com/gp/
> product/1935182021/ref=as_li_
> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> 9325&creativeASIN=1935182021&
> >> > > > > > > > >
> >> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> >> > > > 31ecd1f6b6d1eaf8886ac902a24de4
> >> > > > > > 18%22
> >> > > > > > > > > >
> >> > > > > > > > >
> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> > > > > > garygregory-20&l=am2&o=1&a=
> >> > > > > > > > > 1935182021>
> >> > > > > > > > > Spring Batch in Action
> >> > > > > > > > > <https://www.amazon.com/gp/
> product/1935182951/ref=as_li_
> >> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> >> 9325&creativeASIN=1935182951&
> >> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
> >> tag=garygregory-20&linkId=%7B%
> >> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> > > > > > garygregory-20&l=am2&o=1&a=
> >> > > > > > > > > 1935182951>
> >> > > > > > > > > Blog: http://garygregory.wordpress.com
> >> > > > > > > > > Home: http://garygregory.com/
> >> > > > > > > > > Tweet! http://twitter.com/GaryGregory
> >> > > > > > > > >
> >> > > > > > > >
> >> > > > > > > >
> >> > > > > > > >
> >> > > > > > > > --
> >> > > > > > > > Matt Sicker <bo...@gmail.com>
> >> > > > > > >
> >> > > > > >
> >> > > > > >
> >> > > > > >
> >> > > > > > --
> >> > > > > > Matt Sicker <bo...@gmail.com>
> >> > > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > > --
> >> > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >> > > > > Java Persistence with Hibernate, Second Edition
> >> > > > > <
> >> > > > > https://www.amazon.com/gp/product/1617290459/ref=as_li_
> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> >> cadb800f39946ec62ea2b1af9fe6a2b8
> >> > > > > >
> >> > > > >
> >> > > > > <http:////
> >> > > > >
> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> a=1617290459
> >> > > >
> >> > > > > JUnit in Action, Second Edition
> >> > > > > <
> >> > > > > https://www.amazon.com/gp/product/1935182021/ref=as_li_
> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> >> > > > linkCode=as2&tag=garygregory-20&linkId=
> >> 31ecd1f6b6d1eaf8886ac902a24de4
> >> > > 18%22
> >> > > > > >
> >> > > > >
> >> > > > > <http:////
> >> > > > >
> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> a=1935182021
> >> > > >
> >> > > > > Spring Batch in Action
> >> > > > > <
> >> > > > > https://www.amazon.com/gp/product/1935182951/ref=as_li_
> >> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> >> > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> >> > > > > >
> >> > > > > <http:////
> >> > > > >
> >> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> a=1935182951
> >> > > >
> >> > > > > Blog: http://garygregory.wordpress.com
> >> > > > > Home: http://garygregory.com/
> >> > > > > Tweet! http://twitter.com/GaryGregory
> >> > > > >
> >> > > >
> >> > >
> >> > >
> >> > >
> >> > > --
> >> > > Matt Sicker <bo...@gmail.com>
> >> > >
> >> >
> >>
> >
> >
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > Java Persistence with Hibernate, Second Edition
> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> > JUnit in Action, Second Edition
> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> > Spring Batch in Action
> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] Thread safety annotations

Posted by sebb <se...@gmail.com>.
On 27 November 2016 at 22:03, Gary Gregory <ga...@gmail.com> wrote:
> These annotations are the SAME as have been published all over the place,
> so I do not think we need a PR for review. Reviewing the code in the repo
> should be enough, but I'm not sure _what_ there is to review really. I've
> already posted a link to the sources (a pastebin link). I'll create a Jira
> of course.

There is one aspect that needs review: does the annotation belong in LANG?
If we want to use the annotation in other components, do they have to
depend on LANG?
If not, do they all have their own copies?

And what happens when LANG needs a non-BC release?

My expectation for such annotations is that they would be
self-contained (or built-in to the languange, not LANG).

> Gary
>
> On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <br...@apache.org> wrote:
>
>> Hi,
>>
>> Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov. 2016 um
>> 21:01 Uhr:
>>
>> > So let's start with the CLASS retention annotations first. I'll commit
>> > later today.
>> >
>>
>> Maybe create a GitHub PR so people can have a look before it goes to
>> master?
>>
>> Benedikt
>>
>>
>> >
>> > Gary
>> >
>> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <bo...@gmail.com> wrote:
>> >
>> > > I feel like documenting thread safety in such a low level, widely used
>> > > library like [lang] is a great idea. Whether it uses annotations,
>> > javadocs,
>> > > or some sort of informal javadoc comments isn't too big a deal to me,
>> but
>> > > providing some guarantees of thread safety or lack thereof would be
>> > > invaluable information.
>> > >
>> > > On 27 November 2016 at 07:11, Benedikt Ritter <br...@apache.org>
>> > wrote:
>> > >
>> > > > I thought we decided to abstain from documenting thread safety since
>> it
>> > > > would get outdated quickly anyway.
>> > > >
>> > > > Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov. 2016
>> um
>> > > > 09:11 Uhr:
>> > > >
>> > > > > But if we then want a runtime version we had an odd packaging with
>> > > CLASS
>> > > > > retention in .concurrent. and RUNTIME in .concurrent.runtime.
>> > > > >
>> > > > > I might be in YAGNI territory here...
>> > > > >
>> > > > > Gary
>> > > > >
>> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <bo...@gmail.com>
>> > > wrote:
>> > > > >
>> > > > > > I think adding the additional clazz/runtime package would be a
>> > little
>> > > > > > overkill if you only include one packaging option for now.
>> > > > > >
>> > > > > > On 27 November 2016 at 00:04, Gary Gregory <
>> garydgregory@gmail.com
>> > >
>> > > > > wrote:
>> > > > > >
>> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <bo...@gmail.com>
>> wrote:
>> > > > > > > >
>> > > > > > > > I can think of a couple use cases for runtime retention for
>> > > thread
>> > > > > > safety
>> > > > > > > > annotations, but they're not specific to commons lang.
>> > > > > > > >
>> > > > > > > > 1. A framework could choose what type of data structure or
>> > > > algorithm
>> > > > > to
>> > > > > > > use
>> > > > > > > > at runtime based on the presence of which thread safety
>> > > annotation
>> > > > is
>> > > > > > on.
>> > > > > > > > Same for mutability.
>> > > > > > > > 2. A testing framework could use these annotations to try and
>> > > > > automate
>> > > > > > > some
>> > > > > > > > sort of thread safety tests, though that sounds like a hard
>> > > problem
>> > > > > to
>> > > > > > > > actually implement.
>> > > > > > > >
>> > > > > > > > However, it'd be easier to just start with class retention
>> (or
>> > > > source
>> > > > > > > > retention) just for documentation purposes. Higher retention
>> > > levels
>> > > > > > could
>> > > > > > > > be added later if an important use case came up.
>> > > > > > >
>> > > > > > > But which packaging option?
>> > > > > > >
>> > > > > > > Gary
>> > > > > > > >
>> > > > > > > > On 26 November 2016 at 19:56, Gary Gregory <
>> > > garydgregory@gmail.com
>> > > > >
>> > > > > > > wrote:
>> > > > > > > >
>> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <se...@gmail.com>
>> > > wrote:
>> > > > > > > > >
>> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
>> > > > > garydgregory@gmail.com
>> > > > > > >
>> > > > > > > > > wrote:
>> > > > > > > > > > > On a [crypto] thread, I mentioned
>> > > > http://pastebin.com/RKPGGdJ9
>> > > > > > to
>> > > > > > > add
>> > > > > > > > > > the
>> > > > > > > > > > > "classic" four javax.annotation.concurrent annotations
>> to
>> > > two
>> > > > > > > packages
>> > > > > > > > > > > (.clazz and .runtime) in Commons Lang for CLASS and
>> > RUNTIME
>> > > > > > > retentions.
>> > > > > > > > > > >
>> > > > > > > > > > > You'd use the CLASS version to avoid a hard dependency
>> on
>> > > > > [lang].
>> > > > > > > > > RUNTIME
>> > > > > > > > > > > to keep them around.
>> > > > > > > > > > >
>> > > > > > > > > > > We'd use the CLASS versions in all of Commons for
>> > > documenting
>> > > > > > > thread
>> > > > > > > > > > safety.
>> > > > > > > > > > >
>> > > > > > > > > > > Thoughts?
>> > > > > > > > > >
>> > > > > > > > > > Definitely Class retention, not Runtime.
>> > > > > > > > > > You don't want to have to include the annotation jar on
>> the
>> > > > > runtime
>> > > > > > > > > > classpath.
>> > > > > > > > > >
>> > > > > > > > >
>> > > > > > > > > Hi Sebb,
>> > > > > > > > >
>> > > > > > > > > Right now I have both of these packages:
>> > > > > > > > >
>> > > > > > > > > - org.apache.commons.lang3.annotation.concurrent.clazz
>> > > > > > > > > - org.apache.commons.lang3.annotation.concurrent.runtime
>> > > > > > > > >
>> > > > > > > > > Each with a copy of:
>> > > > > > > > >
>> > > > > > > > > GuardedBy
>> > > > > > > > > Immutable
>> > > > > > > > > NotThreadSafe
>> > > > > > > > > ThreadSafe
>> > > > > > > > >
>> > > > > > > > > Should we include what I have as is?
>> > > > > > > > >
>> > > > > > > > > If we were to only provide the annotation at the CLASS
>> > > retention
>> > > > > > level,
>> > > > > > > > > should we still package them in
>> > ...annotation.concurrent.clazz
>> > > in
>> > > > > > case
>> > > > > > > we
>> > > > > > > > > want to provide annotation.concurrent.runtime later?
>> > > > > > > > >
>> > > > > > > > > If we know for certain we never want to provide RUNTIME
>> > > > retention,
>> > > > > we
>> > > > > > > can
>> > > > > > > > > put them all in annotation.concurrent now.
>> > > > > > > > >
>> > > > > > > > > Thoughts?
>> > > > > > > > >
>> > > > > > > > > Gary
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > > > [I don't know why the annotations were ever considered
>> > > suitable
>> > > > > for
>> > > > > > > > > > runtime]
>> > > > > > > > > >
>> > > > > > > > > > > Gary
>> > > > > > > > > > >
>> > > > > > > > > > > --
>> > > > > > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > > > > > > > > > > Java Persistence with Hibernate, Second Edition
>> > > > > > > > > > > <https://www.amazon.com/gp/
>> product/1617290459/ref=as_li_
>> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> 9325&creativeASIN=1617290459&
>> > > > > > > > > >
>> > > > > > >
>> > > > > linkCode=as2&tag=garygregory-20&linkId=
>> cadb800f39946ec62ea2b1af9fe6a2
>> > > b8>
>> > > > > > > > > > >
>> > > > > > > > > > > <http:////
>> > > > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> > > > > > > > > > 1617290459>
>> > > > > > > > > > > JUnit in Action, Second Edition
>> > > > > > > > > > > <https://www.amazon.com/gp/
>> product/1935182021/ref=as_li_
>> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> 9325&creativeASIN=1935182021&
>> > > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
>> > > > > > > > > 18%22
>> > > > > > > > > > >
>> > > > > > > > > > >
>> > > > > > > > > > > <http:////
>> > > > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> > > > > > > > > > 1935182021>
>> > > > > > > > > > > Spring Batch in Action
>> > > > > > > > > > > <https://www.amazon.com/gp/
>> product/1935182951/ref=as_li_
>> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> 9325&creativeASIN=1935182951&
>> > > > > > > > > >
>> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> > > > > > > > > > > <http:////
>> > > > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> > > > > > > > > > 1935182951>
>> > > > > > > > > > > Blog: http://garygregory.wordpress.com
>> > > > > > > > > > > Home: http://garygregory.com/
>> > > > > > > > > > > Tweet! http://twitter.com/GaryGregory
>> > > > > > > > > >
>> > > > > > > > > >
>> > ------------------------------------------------------------
>> > > > > > > ---------
>> > > > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.
>> apache.org
>> > > > > > > > > > For additional commands, e-mail:
>> > dev-help@commons.apache.org
>> > > > > > > > > >
>> > > > > > > > > >
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > > --
>> > > > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > > > > > > > > Java Persistence with Hibernate, Second Edition
>> > > > > > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> 9325&creativeASIN=1617290459&
>> > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> > > > > > cadb800f39946ec62ea2b1af9fe6a2
>> > > > > > > b8>
>> > > > > > > > >
>> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> > > > > > garygregory-20&l=am2&o=1&a=
>> > > > > > > > > 1617290459>
>> > > > > > > > > JUnit in Action, Second Edition
>> > > > > > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> 9325&creativeASIN=1935182021&
>> > > > > > > > >
>> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
>> > > > 31ecd1f6b6d1eaf8886ac902a24de4
>> > > > > > 18%22
>> > > > > > > > > >
>> > > > > > > > >
>> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> > > > > > garygregory-20&l=am2&o=1&a=
>> > > > > > > > > 1935182021>
>> > > > > > > > > Spring Batch in Action
>> > > > > > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
>> 9325&creativeASIN=1935182951&
>> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
>> tag=garygregory-20&linkId=%7B%
>> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> > > > > > garygregory-20&l=am2&o=1&a=
>> > > > > > > > > 1935182951>
>> > > > > > > > > Blog: http://garygregory.wordpress.com
>> > > > > > > > > Home: http://garygregory.com/
>> > > > > > > > > Tweet! http://twitter.com/GaryGregory
>> > > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > --
>> > > > > > > > Matt Sicker <bo...@gmail.com>
>> > > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > --
>> > > > > > Matt Sicker <bo...@gmail.com>
>> > > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > > --
>> > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > > > > Java Persistence with Hibernate, Second Edition
>> > > > > <
>> > > > > https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> > > > linkCode=as2&tag=garygregory-20&linkId=
>> cadb800f39946ec62ea2b1af9fe6a2b8
>> > > > > >
>> > > > >
>> > > > > <http:////
>> > > > >
>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459
>> > > >
>> > > > > JUnit in Action, Second Edition
>> > > > > <
>> > > > > https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> > > > linkCode=as2&tag=garygregory-20&linkId=
>> 31ecd1f6b6d1eaf8886ac902a24de4
>> > > 18%22
>> > > > > >
>> > > > >
>> > > > > <http:////
>> > > > >
>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021
>> > > >
>> > > > > Spring Batch in Action
>> > > > > <
>> > > > > https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
>> > > > > >
>> > > > > <http:////
>> > > > >
>> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951
>> > > >
>> > > > > Blog: http://garygregory.wordpress.com
>> > > > > Home: http://garygregory.com/
>> > > > > Tweet! http://twitter.com/GaryGregory
>> > > > >
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > Matt Sicker <bo...@gmail.com>
>> > >
>> >
>>
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory

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


Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
These annotations are the SAME as have been published all over the place,
so I do not think we need a PR for review. Reviewing the code in the repo
should be enough, but I'm not sure _what_ there is to review really. I've
already posted a link to the sources (a pastebin link). I'll create a Jira
of course.

Gary

On Sun, Nov 27, 2016 at 1:20 PM, Benedikt Ritter <br...@apache.org> wrote:

> Hi,
>
> Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov. 2016 um
> 21:01 Uhr:
>
> > So let's start with the CLASS retention annotations first. I'll commit
> > later today.
> >
>
> Maybe create a GitHub PR so people can have a look before it goes to
> master?
>
> Benedikt
>
>
> >
> > Gary
> >
> > On Nov 27, 2016 9:50 AM, "Matt Sicker" <bo...@gmail.com> wrote:
> >
> > > I feel like documenting thread safety in such a low level, widely used
> > > library like [lang] is a great idea. Whether it uses annotations,
> > javadocs,
> > > or some sort of informal javadoc comments isn't too big a deal to me,
> but
> > > providing some guarantees of thread safety or lack thereof would be
> > > invaluable information.
> > >
> > > On 27 November 2016 at 07:11, Benedikt Ritter <br...@apache.org>
> > wrote:
> > >
> > > > I thought we decided to abstain from documenting thread safety since
> it
> > > > would get outdated quickly anyway.
> > > >
> > > > Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov. 2016
> um
> > > > 09:11 Uhr:
> > > >
> > > > > But if we then want a runtime version we had an odd packaging with
> > > CLASS
> > > > > retention in .concurrent. and RUNTIME in .concurrent.runtime.
> > > > >
> > > > > I might be in YAGNI territory here...
> > > > >
> > > > > Gary
> > > > >
> > > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <bo...@gmail.com>
> > > wrote:
> > > > >
> > > > > > I think adding the additional clazz/runtime package would be a
> > little
> > > > > > overkill if you only include one packaging option for now.
> > > > > >
> > > > > > On 27 November 2016 at 00:04, Gary Gregory <
> garydgregory@gmail.com
> > >
> > > > > wrote:
> > > > > >
> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <bo...@gmail.com>
> wrote:
> > > > > > > >
> > > > > > > > I can think of a couple use cases for runtime retention for
> > > thread
> > > > > > safety
> > > > > > > > annotations, but they're not specific to commons lang.
> > > > > > > >
> > > > > > > > 1. A framework could choose what type of data structure or
> > > > algorithm
> > > > > to
> > > > > > > use
> > > > > > > > at runtime based on the presence of which thread safety
> > > annotation
> > > > is
> > > > > > on.
> > > > > > > > Same for mutability.
> > > > > > > > 2. A testing framework could use these annotations to try and
> > > > > automate
> > > > > > > some
> > > > > > > > sort of thread safety tests, though that sounds like a hard
> > > problem
> > > > > to
> > > > > > > > actually implement.
> > > > > > > >
> > > > > > > > However, it'd be easier to just start with class retention
> (or
> > > > source
> > > > > > > > retention) just for documentation purposes. Higher retention
> > > levels
> > > > > > could
> > > > > > > > be added later if an important use case came up.
> > > > > > >
> > > > > > > But which packaging option?
> > > > > > >
> > > > > > > Gary
> > > > > > > >
> > > > > > > > On 26 November 2016 at 19:56, Gary Gregory <
> > > garydgregory@gmail.com
> > > > >
> > > > > > > wrote:
> > > > > > > >
> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <se...@gmail.com>
> > > wrote:
> > > > > > > > >
> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> > > > > garydgregory@gmail.com
> > > > > > >
> > > > > > > > > wrote:
> > > > > > > > > > > On a [crypto] thread, I mentioned
> > > > http://pastebin.com/RKPGGdJ9
> > > > > > to
> > > > > > > add
> > > > > > > > > > the
> > > > > > > > > > > "classic" four javax.annotation.concurrent annotations
> to
> > > two
> > > > > > > packages
> > > > > > > > > > > (.clazz and .runtime) in Commons Lang for CLASS and
> > RUNTIME
> > > > > > > retentions.
> > > > > > > > > > >
> > > > > > > > > > > You'd use the CLASS version to avoid a hard dependency
> on
> > > > > [lang].
> > > > > > > > > RUNTIME
> > > > > > > > > > > to keep them around.
> > > > > > > > > > >
> > > > > > > > > > > We'd use the CLASS versions in all of Commons for
> > > documenting
> > > > > > > thread
> > > > > > > > > > safety.
> > > > > > > > > > >
> > > > > > > > > > > Thoughts?
> > > > > > > > > >
> > > > > > > > > > Definitely Class retention, not Runtime.
> > > > > > > > > > You don't want to have to include the annotation jar on
> the
> > > > > runtime
> > > > > > > > > > classpath.
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > > Hi Sebb,
> > > > > > > > >
> > > > > > > > > Right now I have both of these packages:
> > > > > > > > >
> > > > > > > > > - org.apache.commons.lang3.annotation.concurrent.clazz
> > > > > > > > > - org.apache.commons.lang3.annotation.concurrent.runtime
> > > > > > > > >
> > > > > > > > > Each with a copy of:
> > > > > > > > >
> > > > > > > > > GuardedBy
> > > > > > > > > Immutable
> > > > > > > > > NotThreadSafe
> > > > > > > > > ThreadSafe
> > > > > > > > >
> > > > > > > > > Should we include what I have as is?
> > > > > > > > >
> > > > > > > > > If we were to only provide the annotation at the CLASS
> > > retention
> > > > > > level,
> > > > > > > > > should we still package them in
> > ...annotation.concurrent.clazz
> > > in
> > > > > > case
> > > > > > > we
> > > > > > > > > want to provide annotation.concurrent.runtime later?
> > > > > > > > >
> > > > > > > > > If we know for certain we never want to provide RUNTIME
> > > > retention,
> > > > > we
> > > > > > > can
> > > > > > > > > put them all in annotation.concurrent now.
> > > > > > > > >
> > > > > > > > > Thoughts?
> > > > > > > > >
> > > > > > > > > Gary
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > > [I don't know why the annotations were ever considered
> > > suitable
> > > > > for
> > > > > > > > > > runtime]
> > > > > > > > > >
> > > > > > > > > > > Gary
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > > > > > > Java Persistence with Hibernate, Second Edition
> > > > > > > > > > > <https://www.amazon.com/gp/
> product/1617290459/ref=as_li_
> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> 9325&creativeASIN=1617290459&
> > > > > > > > > >
> > > > > > >
> > > > > linkCode=as2&tag=garygregory-20&linkId=
> cadb800f39946ec62ea2b1af9fe6a2
> > > b8>
> > > > > > > > > > >
> > > > > > > > > > > <http:////
> > > > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > > > > > > 1617290459>
> > > > > > > > > > > JUnit in Action, Second Edition
> > > > > > > > > > > <https://www.amazon.com/gp/
> product/1935182021/ref=as_li_
> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> 9325&creativeASIN=1935182021&
> > > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > > > > > 18%22
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > <http:////
> > > > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > > > > > > 1935182021>
> > > > > > > > > > > Spring Batch in Action
> > > > > > > > > > > <https://www.amazon.com/gp/
> product/1935182951/ref=as_li_
> > > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> 9325&creativeASIN=1935182951&
> > > > > > > > > >
> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > > > > > > <http:////
> > > > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > > > > > > 1935182951>
> > > > > > > > > > > Blog: http://garygregory.wordpress.com
> > > > > > > > > > > Home: http://garygregory.com/
> > > > > > > > > > > Tweet! http://twitter.com/GaryGregory
> > > > > > > > > >
> > > > > > > > > >
> > ------------------------------------------------------------
> > > > > > > ---------
> > > > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.
> apache.org
> > > > > > > > > > For additional commands, e-mail:
> > dev-help@commons.apache.org
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > > > > Java Persistence with Hibernate, Second Edition
> > > > > > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> 9325&creativeASIN=1617290459&
> > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > > cadb800f39946ec62ea2b1af9fe6a2
> > > > > > > b8>
> > > > > > > > >
> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > garygregory-20&l=am2&o=1&a=
> > > > > > > > > 1617290459>
> > > > > > > > > JUnit in Action, Second Edition
> > > > > > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> 9325&creativeASIN=1935182021&
> > > > > > > > >
> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > > 18%22
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > garygregory-20&l=am2&o=1&a=
> > > > > > > > > 1935182021>
> > > > > > > > > Spring Batch in Action
> > > > > > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > > > > > tl?ie=UTF8&camp=1789&creative=
> 9325&creativeASIN=1935182951&
> > > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&
> tag=garygregory-20&linkId=%7B%
> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > > garygregory-20&l=am2&o=1&a=
> > > > > > > > > 1935182951>
> > > > > > > > > Blog: http://garygregory.wordpress.com
> > > > > > > > > Home: http://garygregory.com/
> > > > > > > > > Tweet! http://twitter.com/GaryGregory
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Matt Sicker <bo...@gmail.com>
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Matt Sicker <bo...@gmail.com>
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > Java Persistence with Hibernate, Second Edition
> > > > > <
> > > > > https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > linkCode=as2&tag=garygregory-20&linkId=
> cadb800f39946ec62ea2b1af9fe6a2b8
> > > > > >
> > > > >
> > > > > <http:////
> > > > >
> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459
> > > >
> > > > > JUnit in Action, Second Edition
> > > > > <
> > > > > https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > linkCode=as2&tag=garygregory-20&linkId=
> 31ecd1f6b6d1eaf8886ac902a24de4
> > > 18%22
> > > > > >
> > > > >
> > > > > <http:////
> > > > >
> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021
> > > >
> > > > > Spring Batch in Action
> > > > > <
> > > > > https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> > > > > >
> > > > > <http:////
> > > > >
> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951
> > > >
> > > > > Blog: http://garygregory.wordpress.com
> > > > > Home: http://garygregory.com/
> > > > > Tweet! http://twitter.com/GaryGregory
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Matt Sicker <bo...@gmail.com>
> > >
> >
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] Thread safety annotations

Posted by Benedikt Ritter <br...@apache.org>.
Hi,

Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov. 2016 um
21:01 Uhr:

> So let's start with the CLASS retention annotations first. I'll commit
> later today.
>

Maybe create a GitHub PR so people can have a look before it goes to master?

Benedikt


>
> Gary
>
> On Nov 27, 2016 9:50 AM, "Matt Sicker" <bo...@gmail.com> wrote:
>
> > I feel like documenting thread safety in such a low level, widely used
> > library like [lang] is a great idea. Whether it uses annotations,
> javadocs,
> > or some sort of informal javadoc comments isn't too big a deal to me, but
> > providing some guarantees of thread safety or lack thereof would be
> > invaluable information.
> >
> > On 27 November 2016 at 07:11, Benedikt Ritter <br...@apache.org>
> wrote:
> >
> > > I thought we decided to abstain from documenting thread safety since it
> > > would get outdated quickly anyway.
> > >
> > > Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov. 2016 um
> > > 09:11 Uhr:
> > >
> > > > But if we then want a runtime version we had an odd packaging with
> > CLASS
> > > > retention in .concurrent. and RUNTIME in .concurrent.runtime.
> > > >
> > > > I might be in YAGNI territory here...
> > > >
> > > > Gary
> > > >
> > > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <bo...@gmail.com>
> > wrote:
> > > >
> > > > > I think adding the additional clazz/runtime package would be a
> little
> > > > > overkill if you only include one packaging option for now.
> > > > >
> > > > > On 27 November 2016 at 00:04, Gary Gregory <garydgregory@gmail.com
> >
> > > > wrote:
> > > > >
> > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <bo...@gmail.com> wrote:
> > > > > > >
> > > > > > > I can think of a couple use cases for runtime retention for
> > thread
> > > > > safety
> > > > > > > annotations, but they're not specific to commons lang.
> > > > > > >
> > > > > > > 1. A framework could choose what type of data structure or
> > > algorithm
> > > > to
> > > > > > use
> > > > > > > at runtime based on the presence of which thread safety
> > annotation
> > > is
> > > > > on.
> > > > > > > Same for mutability.
> > > > > > > 2. A testing framework could use these annotations to try and
> > > > automate
> > > > > > some
> > > > > > > sort of thread safety tests, though that sounds like a hard
> > problem
> > > > to
> > > > > > > actually implement.
> > > > > > >
> > > > > > > However, it'd be easier to just start with class retention (or
> > > source
> > > > > > > retention) just for documentation purposes. Higher retention
> > levels
> > > > > could
> > > > > > > be added later if an important use case came up.
> > > > > >
> > > > > > But which packaging option?
> > > > > >
> > > > > > Gary
> > > > > > >
> > > > > > > On 26 November 2016 at 19:56, Gary Gregory <
> > garydgregory@gmail.com
> > > >
> > > > > > wrote:
> > > > > > >
> > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <se...@gmail.com>
> > wrote:
> > > > > > > >
> > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> > > > garydgregory@gmail.com
> > > > > >
> > > > > > > > wrote:
> > > > > > > > > > On a [crypto] thread, I mentioned
> > > http://pastebin.com/RKPGGdJ9
> > > > > to
> > > > > > add
> > > > > > > > > the
> > > > > > > > > > "classic" four javax.annotation.concurrent annotations to
> > two
> > > > > > packages
> > > > > > > > > > (.clazz and .runtime) in Commons Lang for CLASS and
> RUNTIME
> > > > > > retentions.
> > > > > > > > > >
> > > > > > > > > > You'd use the CLASS version to avoid a hard dependency on
> > > > [lang].
> > > > > > > > RUNTIME
> > > > > > > > > > to keep them around.
> > > > > > > > > >
> > > > > > > > > > We'd use the CLASS versions in all of Commons for
> > documenting
> > > > > > thread
> > > > > > > > > safety.
> > > > > > > > > >
> > > > > > > > > > Thoughts?
> > > > > > > > >
> > > > > > > > > Definitely Class retention, not Runtime.
> > > > > > > > > You don't want to have to include the annotation jar on the
> > > > runtime
> > > > > > > > > classpath.
> > > > > > > > >
> > > > > > > >
> > > > > > > > Hi Sebb,
> > > > > > > >
> > > > > > > > Right now I have both of these packages:
> > > > > > > >
> > > > > > > > - org.apache.commons.lang3.annotation.concurrent.clazz
> > > > > > > > - org.apache.commons.lang3.annotation.concurrent.runtime
> > > > > > > >
> > > > > > > > Each with a copy of:
> > > > > > > >
> > > > > > > > GuardedBy
> > > > > > > > Immutable
> > > > > > > > NotThreadSafe
> > > > > > > > ThreadSafe
> > > > > > > >
> > > > > > > > Should we include what I have as is?
> > > > > > > >
> > > > > > > > If we were to only provide the annotation at the CLASS
> > retention
> > > > > level,
> > > > > > > > should we still package them in
> ...annotation.concurrent.clazz
> > in
> > > > > case
> > > > > > we
> > > > > > > > want to provide annotation.concurrent.runtime later?
> > > > > > > >
> > > > > > > > If we know for certain we never want to provide RUNTIME
> > > retention,
> > > > we
> > > > > > can
> > > > > > > > put them all in annotation.concurrent now.
> > > > > > > >
> > > > > > > > Thoughts?
> > > > > > > >
> > > > > > > > Gary
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > > [I don't know why the annotations were ever considered
> > suitable
> > > > for
> > > > > > > > > runtime]
> > > > > > > > >
> > > > > > > > > > Gary
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > > > > > Java Persistence with Hibernate, Second Edition
> > > > > > > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > > > > >
> > > > > >
> > > > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
> > b8>
> > > > > > > > > >
> > > > > > > > > > <http:////
> > > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > > > > > 1617290459>
> > > > > > > > > > JUnit in Action, Second Edition
> > > > > > > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > > > > 18%22
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > <http:////
> > > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > > > > > 1935182021>
> > > > > > > > > > Spring Batch in Action
> > > > > > > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > > > > >
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > > > > > <http:////
> > > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > > > > > 1935182951>
> > > > > > > > > > Blog: http://garygregory.wordpress.com
> > > > > > > > > > Home: http://garygregory.com/
> > > > > > > > > > Tweet! http://twitter.com/GaryGregory
> > > > > > > > >
> > > > > > > > >
> ------------------------------------------------------------
> > > > > > ---------
> > > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > > > > > > For additional commands, e-mail:
> dev-help@commons.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > > > Java Persistence with Hibernate, Second Edition
> > > > > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > cadb800f39946ec62ea2b1af9fe6a2
> > > > > > b8>
> > > > > > > >
> > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > garygregory-20&l=am2&o=1&a=
> > > > > > > > 1617290459>
> > > > > > > > JUnit in Action, Second Edition
> > > > > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > > > >
> > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > 18%22
> > > > > > > > >
> > > > > > > >
> > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > garygregory-20&l=am2&o=1&a=
> > > > > > > > 1935182021>
> > > > > > > > Spring Batch in Action
> > > > > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > > garygregory-20&l=am2&o=1&a=
> > > > > > > > 1935182951>
> > > > > > > > Blog: http://garygregory.wordpress.com
> > > > > > > > Home: http://garygregory.com/
> > > > > > > > Tweet! http://twitter.com/GaryGregory
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Matt Sicker <bo...@gmail.com>
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Matt Sicker <bo...@gmail.com>
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > Java Persistence with Hibernate, Second Edition
> > > > <
> > > > https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8
> > > > >
> > > >
> > > > <http:////
> > > >
> ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459
> > >
> > > > JUnit in Action, Second Edition
> > > > <
> > > > https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> > 18%22
> > > > >
> > > >
> > > > <http:////
> > > >
> ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021
> > >
> > > > Spring Batch in Action
> > > > <
> > > > https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> > > > >
> > > > <http:////
> > > >
> ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951
> > >
> > > > Blog: http://garygregory.wordpress.com
> > > > Home: http://garygregory.com/
> > > > Tweet! http://twitter.com/GaryGregory
> > > >
> > >
> >
> >
> >
> > --
> > Matt Sicker <bo...@gmail.com>
> >
>

Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
So let's start with the CLASS retention annotations first. I'll commit
later today.

Gary

On Nov 27, 2016 9:50 AM, "Matt Sicker" <bo...@gmail.com> wrote:

> I feel like documenting thread safety in such a low level, widely used
> library like [lang] is a great idea. Whether it uses annotations, javadocs,
> or some sort of informal javadoc comments isn't too big a deal to me, but
> providing some guarantees of thread safety or lack thereof would be
> invaluable information.
>
> On 27 November 2016 at 07:11, Benedikt Ritter <br...@apache.org> wrote:
>
> > I thought we decided to abstain from documenting thread safety since it
> > would get outdated quickly anyway.
> >
> > Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov. 2016 um
> > 09:11 Uhr:
> >
> > > But if we then want a runtime version we had an odd packaging with
> CLASS
> > > retention in .concurrent. and RUNTIME in .concurrent.runtime.
> > >
> > > I might be in YAGNI territory here...
> > >
> > > Gary
> > >
> > > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <bo...@gmail.com>
> wrote:
> > >
> > > > I think adding the additional clazz/runtime package would be a little
> > > > overkill if you only include one packaging option for now.
> > > >
> > > > On 27 November 2016 at 00:04, Gary Gregory <ga...@gmail.com>
> > > wrote:
> > > >
> > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <bo...@gmail.com> wrote:
> > > > > >
> > > > > > I can think of a couple use cases for runtime retention for
> thread
> > > > safety
> > > > > > annotations, but they're not specific to commons lang.
> > > > > >
> > > > > > 1. A framework could choose what type of data structure or
> > algorithm
> > > to
> > > > > use
> > > > > > at runtime based on the presence of which thread safety
> annotation
> > is
> > > > on.
> > > > > > Same for mutability.
> > > > > > 2. A testing framework could use these annotations to try and
> > > automate
> > > > > some
> > > > > > sort of thread safety tests, though that sounds like a hard
> problem
> > > to
> > > > > > actually implement.
> > > > > >
> > > > > > However, it'd be easier to just start with class retention (or
> > source
> > > > > > retention) just for documentation purposes. Higher retention
> levels
> > > > could
> > > > > > be added later if an important use case came up.
> > > > >
> > > > > But which packaging option?
> > > > >
> > > > > Gary
> > > > > >
> > > > > > On 26 November 2016 at 19:56, Gary Gregory <
> garydgregory@gmail.com
> > >
> > > > > wrote:
> > > > > >
> > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <se...@gmail.com>
> wrote:
> > > > > > >
> > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> > > garydgregory@gmail.com
> > > > >
> > > > > > > wrote:
> > > > > > > > > On a [crypto] thread, I mentioned
> > http://pastebin.com/RKPGGdJ9
> > > > to
> > > > > add
> > > > > > > > the
> > > > > > > > > "classic" four javax.annotation.concurrent annotations to
> two
> > > > > packages
> > > > > > > > > (.clazz and .runtime) in Commons Lang for CLASS and RUNTIME
> > > > > retentions.
> > > > > > > > >
> > > > > > > > > You'd use the CLASS version to avoid a hard dependency on
> > > [lang].
> > > > > > > RUNTIME
> > > > > > > > > to keep them around.
> > > > > > > > >
> > > > > > > > > We'd use the CLASS versions in all of Commons for
> documenting
> > > > > thread
> > > > > > > > safety.
> > > > > > > > >
> > > > > > > > > Thoughts?
> > > > > > > >
> > > > > > > > Definitely Class retention, not Runtime.
> > > > > > > > You don't want to have to include the annotation jar on the
> > > runtime
> > > > > > > > classpath.
> > > > > > > >
> > > > > > >
> > > > > > > Hi Sebb,
> > > > > > >
> > > > > > > Right now I have both of these packages:
> > > > > > >
> > > > > > > - org.apache.commons.lang3.annotation.concurrent.clazz
> > > > > > > - org.apache.commons.lang3.annotation.concurrent.runtime
> > > > > > >
> > > > > > > Each with a copy of:
> > > > > > >
> > > > > > > GuardedBy
> > > > > > > Immutable
> > > > > > > NotThreadSafe
> > > > > > > ThreadSafe
> > > > > > >
> > > > > > > Should we include what I have as is?
> > > > > > >
> > > > > > > If we were to only provide the annotation at the CLASS
> retention
> > > > level,
> > > > > > > should we still package them in ...annotation.concurrent.clazz
> in
> > > > case
> > > > > we
> > > > > > > want to provide annotation.concurrent.runtime later?
> > > > > > >
> > > > > > > If we know for certain we never want to provide RUNTIME
> > retention,
> > > we
> > > > > can
> > > > > > > put them all in annotation.concurrent now.
> > > > > > >
> > > > > > > Thoughts?
> > > > > > >
> > > > > > > Gary
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > > [I don't know why the annotations were ever considered
> suitable
> > > for
> > > > > > > > runtime]
> > > > > > > >
> > > > > > > > > Gary
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > > > > Java Persistence with Hibernate, Second Edition
> > > > > > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > > > >
> > > > >
> > > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
> b8>
> > > > > > > > >
> > > > > > > > > <http:////
> > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > > > > 1617290459>
> > > > > > > > > JUnit in Action, Second Edition
> > > > > > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > > > 18%22
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > <http:////
> > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > > > > 1935182021>
> > > > > > > > > Spring Batch in Action
> > > > > > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > > > > <http:////
> > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > > > > 1935182951>
> > > > > > > > > Blog: http://garygregory.wordpress.com
> > > > > > > > > Home: http://garygregory.com/
> > > > > > > > > Tweet! http://twitter.com/GaryGregory
> > > > > > > >
> > > > > > > > ------------------------------------------------------------
> > > > > ---------
> > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > > > > > For additional commands, e-mail: dev-help@commons.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > > Java Persistence with Hibernate, Second Edition
> > > > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > cadb800f39946ec62ea2b1af9fe6a2
> > > > > b8>
> > > > > > >
> > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > garygregory-20&l=am2&o=1&a=
> > > > > > > 1617290459>
> > > > > > > JUnit in Action, Second Edition
> > > > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > > >
> > > > > linkCode=as2&tag=garygregory-20&linkId=
> > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > 18%22
> > > > > > > >
> > > > > > >
> > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > garygregory-20&l=am2&o=1&a=
> > > > > > > 1935182021>
> > > > > > > Spring Batch in Action
> > > > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > > garygregory-20&l=am2&o=1&a=
> > > > > > > 1935182951>
> > > > > > > Blog: http://garygregory.wordpress.com
> > > > > > > Home: http://garygregory.com/
> > > > > > > Tweet! http://twitter.com/GaryGregory
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Matt Sicker <bo...@gmail.com>
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Matt Sicker <bo...@gmail.com>
> > > >
> > >
> > >
> > >
> > > --
> > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > Java Persistence with Hibernate, Second Edition
> > > <
> > > https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8
> > > >
> > >
> > > <http:////
> > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459
> >
> > > JUnit in Action, Second Edition
> > > <
> > > https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> 18%22
> > > >
> > >
> > > <http:////
> > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021
> >
> > > Spring Batch in Action
> > > <
> > > https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> > > >
> > > <http:////
> > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951
> >
> > > Blog: http://garygregory.wordpress.com
> > > Home: http://garygregory.com/
> > > Tweet! http://twitter.com/GaryGregory
> > >
> >
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>

Re: [lang] Thread safety annotations

Posted by Matt Sicker <bo...@gmail.com>.
I feel like documenting thread safety in such a low level, widely used
library like [lang] is a great idea. Whether it uses annotations, javadocs,
or some sort of informal javadoc comments isn't too big a deal to me, but
providing some guarantees of thread safety or lack thereof would be
invaluable information.

On 27 November 2016 at 07:11, Benedikt Ritter <br...@apache.org> wrote:

> I thought we decided to abstain from documenting thread safety since it
> would get outdated quickly anyway.
>
> Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov. 2016 um
> 09:11 Uhr:
>
> > But if we then want a runtime version we had an odd packaging with CLASS
> > retention in .concurrent. and RUNTIME in .concurrent.runtime.
> >
> > I might be in YAGNI territory here...
> >
> > Gary
> >
> > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <bo...@gmail.com> wrote:
> >
> > > I think adding the additional clazz/runtime package would be a little
> > > overkill if you only include one packaging option for now.
> > >
> > > On 27 November 2016 at 00:04, Gary Gregory <ga...@gmail.com>
> > wrote:
> > >
> > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <bo...@gmail.com> wrote:
> > > > >
> > > > > I can think of a couple use cases for runtime retention for thread
> > > safety
> > > > > annotations, but they're not specific to commons lang.
> > > > >
> > > > > 1. A framework could choose what type of data structure or
> algorithm
> > to
> > > > use
> > > > > at runtime based on the presence of which thread safety annotation
> is
> > > on.
> > > > > Same for mutability.
> > > > > 2. A testing framework could use these annotations to try and
> > automate
> > > > some
> > > > > sort of thread safety tests, though that sounds like a hard problem
> > to
> > > > > actually implement.
> > > > >
> > > > > However, it'd be easier to just start with class retention (or
> source
> > > > > retention) just for documentation purposes. Higher retention levels
> > > could
> > > > > be added later if an important use case came up.
> > > >
> > > > But which packaging option?
> > > >
> > > > Gary
> > > > >
> > > > > On 26 November 2016 at 19:56, Gary Gregory <garydgregory@gmail.com
> >
> > > > wrote:
> > > > >
> > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <se...@gmail.com> wrote:
> > > > > >
> > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> > garydgregory@gmail.com
> > > >
> > > > > > wrote:
> > > > > > > > On a [crypto] thread, I mentioned
> http://pastebin.com/RKPGGdJ9
> > > to
> > > > add
> > > > > > > the
> > > > > > > > "classic" four javax.annotation.concurrent annotations to two
> > > > packages
> > > > > > > > (.clazz and .runtime) in Commons Lang for CLASS and RUNTIME
> > > > retentions.
> > > > > > > >
> > > > > > > > You'd use the CLASS version to avoid a hard dependency on
> > [lang].
> > > > > > RUNTIME
> > > > > > > > to keep them around.
> > > > > > > >
> > > > > > > > We'd use the CLASS versions in all of Commons for documenting
> > > > thread
> > > > > > > safety.
> > > > > > > >
> > > > > > > > Thoughts?
> > > > > > >
> > > > > > > Definitely Class retention, not Runtime.
> > > > > > > You don't want to have to include the annotation jar on the
> > runtime
> > > > > > > classpath.
> > > > > > >
> > > > > >
> > > > > > Hi Sebb,
> > > > > >
> > > > > > Right now I have both of these packages:
> > > > > >
> > > > > > - org.apache.commons.lang3.annotation.concurrent.clazz
> > > > > > - org.apache.commons.lang3.annotation.concurrent.runtime
> > > > > >
> > > > > > Each with a copy of:
> > > > > >
> > > > > > GuardedBy
> > > > > > Immutable
> > > > > > NotThreadSafe
> > > > > > ThreadSafe
> > > > > >
> > > > > > Should we include what I have as is?
> > > > > >
> > > > > > If we were to only provide the annotation at the CLASS retention
> > > level,
> > > > > > should we still package them in ...annotation.concurrent.clazz in
> > > case
> > > > we
> > > > > > want to provide annotation.concurrent.runtime later?
> > > > > >
> > > > > > If we know for certain we never want to provide RUNTIME
> retention,
> > we
> > > > can
> > > > > > put them all in annotation.concurrent now.
> > > > > >
> > > > > > Thoughts?
> > > > > >
> > > > > > Gary
> > > > > >
> > > > > >
> > > > > >
> > > > > > > [I don't know why the annotations were ever considered suitable
> > for
> > > > > > > runtime]
> > > > > > >
> > > > > > > > Gary
> > > > > > > >
> > > > > > > > --
> > > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > > > Java Persistence with Hibernate, Second Edition
> > > > > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > > >
> > > >
> > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> > > > > > > >
> > > > > > > > <http:////
> > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > > > 1617290459>
> > > > > > > > JUnit in Action, Second Edition
> > > > > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > > 18%22
> > > > > > > >
> > > > > > > >
> > > > > > > > <http:////
> > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > > > 1935182021>
> > > > > > > > Spring Batch in Action
> > > > > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > > > <http:////
> > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > > > 1935182951>
> > > > > > > > Blog: http://garygregory.wordpress.com
> > > > > > > > Home: http://garygregory.com/
> > > > > > > > Tweet! http://twitter.com/GaryGregory
> > > > > > >
> > > > > > > ------------------------------------------------------------
> > > > ---------
> > > > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > > > > For additional commands, e-mail: dev-help@commons.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > Java Persistence with Hibernate, Second Edition
> > > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > cadb800f39946ec62ea2b1af9fe6a2
> > > > b8>
> > > > > >
> > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > garygregory-20&l=am2&o=1&a=
> > > > > > 1617290459>
> > > > > > JUnit in Action, Second Edition
> > > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > >
> > > > linkCode=as2&tag=garygregory-20&linkId=
> 31ecd1f6b6d1eaf8886ac902a24de4
> > > 18%22
> > > > > > >
> > > > > >
> > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > garygregory-20&l=am2&o=1&a=
> > > > > > 1935182021>
> > > > > > Spring Batch in Action
> > > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > garygregory-20&l=am2&o=1&a=
> > > > > > 1935182951>
> > > > > > Blog: http://garygregory.wordpress.com
> > > > > > Home: http://garygregory.com/
> > > > > > Tweet! http://twitter.com/GaryGregory
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Matt Sicker <bo...@gmail.com>
> > > >
> > >
> > >
> > >
> > > --
> > > Matt Sicker <bo...@gmail.com>
> > >
> >
> >
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > Java Persistence with Hibernate, Second Edition
> > <
> > https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8
> > >
> >
> > <http:////
> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
> > JUnit in Action, Second Edition
> > <
> > https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> > >
> >
> > <http:////
> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
> > Spring Batch in Action
> > <
> > https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> > >
> > <http:////
> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
> >
>



-- 
Matt Sicker <bo...@gmail.com>

Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
My view is that it might be challenging to do and keep the information
accurate over time, but that this is a worthy goal nonetheless. Having the
annotations around will allow for anyone to do this in a standard way.
Coming up with a Javadoc only way to do this is too much of a pain IMO.

Gary

On Nov 27, 2016 5:11 AM, "Benedikt Ritter" <br...@apache.org> wrote:

> I thought we decided to abstain from documenting thread safety since it
> would get outdated quickly anyway.
>
> Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov. 2016 um
> 09:11 Uhr:
>
> > But if we then want a runtime version we had an odd packaging with CLASS
> > retention in .concurrent. and RUNTIME in .concurrent.runtime.
> >
> > I might be in YAGNI territory here...
> >
> > Gary
> >
> > On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <bo...@gmail.com> wrote:
> >
> > > I think adding the additional clazz/runtime package would be a little
> > > overkill if you only include one packaging option for now.
> > >
> > > On 27 November 2016 at 00:04, Gary Gregory <ga...@gmail.com>
> > wrote:
> > >
> > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <bo...@gmail.com> wrote:
> > > > >
> > > > > I can think of a couple use cases for runtime retention for thread
> > > safety
> > > > > annotations, but they're not specific to commons lang.
> > > > >
> > > > > 1. A framework could choose what type of data structure or
> algorithm
> > to
> > > > use
> > > > > at runtime based on the presence of which thread safety annotation
> is
> > > on.
> > > > > Same for mutability.
> > > > > 2. A testing framework could use these annotations to try and
> > automate
> > > > some
> > > > > sort of thread safety tests, though that sounds like a hard problem
> > to
> > > > > actually implement.
> > > > >
> > > > > However, it'd be easier to just start with class retention (or
> source
> > > > > retention) just for documentation purposes. Higher retention levels
> > > could
> > > > > be added later if an important use case came up.
> > > >
> > > > But which packaging option?
> > > >
> > > > Gary
> > > > >
> > > > > On 26 November 2016 at 19:56, Gary Gregory <garydgregory@gmail.com
> >
> > > > wrote:
> > > > >
> > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <se...@gmail.com> wrote:
> > > > > >
> > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> > garydgregory@gmail.com
> > > >
> > > > > > wrote:
> > > > > > > > On a [crypto] thread, I mentioned
> http://pastebin.com/RKPGGdJ9
> > > to
> > > > add
> > > > > > > the
> > > > > > > > "classic" four javax.annotation.concurrent annotations to two
> > > > packages
> > > > > > > > (.clazz and .runtime) in Commons Lang for CLASS and RUNTIME
> > > > retentions.
> > > > > > > >
> > > > > > > > You'd use the CLASS version to avoid a hard dependency on
> > [lang].
> > > > > > RUNTIME
> > > > > > > > to keep them around.
> > > > > > > >
> > > > > > > > We'd use the CLASS versions in all of Commons for documenting
> > > > thread
> > > > > > > safety.
> > > > > > > >
> > > > > > > > Thoughts?
> > > > > > >
> > > > > > > Definitely Class retention, not Runtime.
> > > > > > > You don't want to have to include the annotation jar on the
> > runtime
> > > > > > > classpath.
> > > > > > >
> > > > > >
> > > > > > Hi Sebb,
> > > > > >
> > > > > > Right now I have both of these packages:
> > > > > >
> > > > > > - org.apache.commons.lang3.annotation.concurrent.clazz
> > > > > > - org.apache.commons.lang3.annotation.concurrent.runtime
> > > > > >
> > > > > > Each with a copy of:
> > > > > >
> > > > > > GuardedBy
> > > > > > Immutable
> > > > > > NotThreadSafe
> > > > > > ThreadSafe
> > > > > >
> > > > > > Should we include what I have as is?
> > > > > >
> > > > > > If we were to only provide the annotation at the CLASS retention
> > > level,
> > > > > > should we still package them in ...annotation.concurrent.clazz in
> > > case
> > > > we
> > > > > > want to provide annotation.concurrent.runtime later?
> > > > > >
> > > > > > If we know for certain we never want to provide RUNTIME
> retention,
> > we
> > > > can
> > > > > > put them all in annotation.concurrent now.
> > > > > >
> > > > > > Thoughts?
> > > > > >
> > > > > > Gary
> > > > > >
> > > > > >
> > > > > >
> > > > > > > [I don't know why the annotations were ever considered suitable
> > for
> > > > > > > runtime]
> > > > > > >
> > > > > > > > Gary
> > > > > > > >
> > > > > > > > --
> > > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > > > Java Persistence with Hibernate, Second Edition
> > > > > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > > >
> > > >
> > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> > > > > > > >
> > > > > > > > <http:////
> > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > > > 1617290459>
> > > > > > > > JUnit in Action, Second Edition
> > > > > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > > 18%22
> > > > > > > >
> > > > > > > >
> > > > > > > > <http:////
> > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > > > 1935182021>
> > > > > > > > Spring Batch in Action
> > > > > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > > > <http:////
> > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > > > 1935182951>
> > > > > > > > Blog: http://garygregory.wordpress.com
> > > > > > > > Home: http://garygregory.com/
> > > > > > > > Tweet! http://twitter.com/GaryGregory
> > > > > > >
> > > > > > > ------------------------------------------------------------
> > > > ---------
> > > > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > > > > For additional commands, e-mail: dev-help@commons.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > Java Persistence with Hibernate, Second Edition
> > > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > cadb800f39946ec62ea2b1af9fe6a2
> > > > b8>
> > > > > >
> > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > garygregory-20&l=am2&o=1&a=
> > > > > > 1617290459>
> > > > > > JUnit in Action, Second Edition
> > > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > >
> > > > linkCode=as2&tag=garygregory-20&linkId=
> 31ecd1f6b6d1eaf8886ac902a24de4
> > > 18%22
> > > > > > >
> > > > > >
> > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > garygregory-20&l=am2&o=1&a=
> > > > > > 1935182021>
> > > > > > Spring Batch in Action
> > > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > > garygregory-20&l=am2&o=1&a=
> > > > > > 1935182951>
> > > > > > Blog: http://garygregory.wordpress.com
> > > > > > Home: http://garygregory.com/
> > > > > > Tweet! http://twitter.com/GaryGregory
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Matt Sicker <bo...@gmail.com>
> > > >
> > >
> > >
> > >
> > > --
> > > Matt Sicker <bo...@gmail.com>
> > >
> >
> >
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > Java Persistence with Hibernate, Second Edition
> > <
> > https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8
> > >
> >
> > <http:////
> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
> > JUnit in Action, Second Edition
> > <
> > https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> > >
> >
> > <http:////
> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
> > Spring Batch in Action
> > <
> > https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> > >
> > <http:////
> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
> >
>

Re: [lang] Thread safety annotations

Posted by Benedikt Ritter <br...@apache.org>.
I thought we decided to abstain from documenting thread safety since it
would get outdated quickly anyway.

Gary Gregory <ga...@gmail.com> schrieb am So., 27. Nov. 2016 um
09:11 Uhr:

> But if we then want a runtime version we had an odd packaging with CLASS
> retention in .concurrent. and RUNTIME in .concurrent.runtime.
>
> I might be in YAGNI territory here...
>
> Gary
>
> On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <bo...@gmail.com> wrote:
>
> > I think adding the additional clazz/runtime package would be a little
> > overkill if you only include one packaging option for now.
> >
> > On 27 November 2016 at 00:04, Gary Gregory <ga...@gmail.com>
> wrote:
> >
> > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <bo...@gmail.com> wrote:
> > > >
> > > > I can think of a couple use cases for runtime retention for thread
> > safety
> > > > annotations, but they're not specific to commons lang.
> > > >
> > > > 1. A framework could choose what type of data structure or algorithm
> to
> > > use
> > > > at runtime based on the presence of which thread safety annotation is
> > on.
> > > > Same for mutability.
> > > > 2. A testing framework could use these annotations to try and
> automate
> > > some
> > > > sort of thread safety tests, though that sounds like a hard problem
> to
> > > > actually implement.
> > > >
> > > > However, it'd be easier to just start with class retention (or source
> > > > retention) just for documentation purposes. Higher retention levels
> > could
> > > > be added later if an important use case came up.
> > >
> > > But which packaging option?
> > >
> > > Gary
> > > >
> > > > On 26 November 2016 at 19:56, Gary Gregory <ga...@gmail.com>
> > > wrote:
> > > >
> > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <se...@gmail.com> wrote:
> > > > >
> > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> garydgregory@gmail.com
> > >
> > > > > wrote:
> > > > > > > On a [crypto] thread, I mentioned http://pastebin.com/RKPGGdJ9
> > to
> > > add
> > > > > > the
> > > > > > > "classic" four javax.annotation.concurrent annotations to two
> > > packages
> > > > > > > (.clazz and .runtime) in Commons Lang for CLASS and RUNTIME
> > > retentions.
> > > > > > >
> > > > > > > You'd use the CLASS version to avoid a hard dependency on
> [lang].
> > > > > RUNTIME
> > > > > > > to keep them around.
> > > > > > >
> > > > > > > We'd use the CLASS versions in all of Commons for documenting
> > > thread
> > > > > > safety.
> > > > > > >
> > > > > > > Thoughts?
> > > > > >
> > > > > > Definitely Class retention, not Runtime.
> > > > > > You don't want to have to include the annotation jar on the
> runtime
> > > > > > classpath.
> > > > > >
> > > > >
> > > > > Hi Sebb,
> > > > >
> > > > > Right now I have both of these packages:
> > > > >
> > > > > - org.apache.commons.lang3.annotation.concurrent.clazz
> > > > > - org.apache.commons.lang3.annotation.concurrent.runtime
> > > > >
> > > > > Each with a copy of:
> > > > >
> > > > > GuardedBy
> > > > > Immutable
> > > > > NotThreadSafe
> > > > > ThreadSafe
> > > > >
> > > > > Should we include what I have as is?
> > > > >
> > > > > If we were to only provide the annotation at the CLASS retention
> > level,
> > > > > should we still package them in ...annotation.concurrent.clazz in
> > case
> > > we
> > > > > want to provide annotation.concurrent.runtime later?
> > > > >
> > > > > If we know for certain we never want to provide RUNTIME retention,
> we
> > > can
> > > > > put them all in annotation.concurrent now.
> > > > >
> > > > > Thoughts?
> > > > >
> > > > > Gary
> > > > >
> > > > >
> > > > >
> > > > > > [I don't know why the annotations were ever considered suitable
> for
> > > > > > runtime]
> > > > > >
> > > > > > > Gary
> > > > > > >
> > > > > > > --
> > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > > Java Persistence with Hibernate, Second Edition
> > > > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > >
> > >
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> > > > > > >
> > > > > > > <http:////
> > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > > 1617290459>
> > > > > > > JUnit in Action, Second Edition
> > > > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > > linkCode=as2&tag=garygregory-20&linkId=
> > > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > > 18%22
> > > > > > >
> > > > > > >
> > > > > > > <http:////
> > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > > 1935182021>
> > > > > > > Spring Batch in Action
> > > > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > > <http:////
> > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > > 1935182951>
> > > > > > > Blog: http://garygregory.wordpress.com
> > > > > > > Home: http://garygregory.com/
> > > > > > > Tweet! http://twitter.com/GaryGregory
> > > > > >
> > > > > > ------------------------------------------------------------
> > > ---------
> > > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > > > For additional commands, e-mail: dev-help@commons.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > Java Persistence with Hibernate, Second Edition
> > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > > linkCode=as2&tag=garygregory-20&linkId=
> > cadb800f39946ec62ea2b1af9fe6a2
> > > b8>
> > > > >
> > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > garygregory-20&l=am2&o=1&a=
> > > > > 1617290459>
> > > > > JUnit in Action, Second Edition
> > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > >
> > > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> > 18%22
> > > > > >
> > > > >
> > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > garygregory-20&l=am2&o=1&a=
> > > > > 1935182021>
> > > > > Spring Batch in Action
> > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> > garygregory-20&l=am2&o=1&a=
> > > > > 1935182951>
> > > > > Blog: http://garygregory.wordpress.com
> > > > > Home: http://garygregory.com/
> > > > > Tweet! http://twitter.com/GaryGregory
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Matt Sicker <bo...@gmail.com>
> > >
> >
> >
> >
> > --
> > Matt Sicker <bo...@gmail.com>
> >
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <
> https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8
> >
>
> <http:////
> ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
> JUnit in Action, Second Edition
> <
> https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
>
> <http:////
> ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
> Spring Batch in Action
> <
> https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
> >
> <http:////
> ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>

Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
But if we then want a runtime version we had an odd packaging with CLASS
retention in .concurrent. and RUNTIME in .concurrent.runtime.

I might be in YAGNI territory here...

Gary

On Sat, Nov 26, 2016 at 10:07 PM, Matt Sicker <bo...@gmail.com> wrote:

> I think adding the additional clazz/runtime package would be a little
> overkill if you only include one packaging option for now.
>
> On 27 November 2016 at 00:04, Gary Gregory <ga...@gmail.com> wrote:
>
> > On Nov 26, 2016 8:40 PM, "Matt Sicker" <bo...@gmail.com> wrote:
> > >
> > > I can think of a couple use cases for runtime retention for thread
> safety
> > > annotations, but they're not specific to commons lang.
> > >
> > > 1. A framework could choose what type of data structure or algorithm to
> > use
> > > at runtime based on the presence of which thread safety annotation is
> on.
> > > Same for mutability.
> > > 2. A testing framework could use these annotations to try and automate
> > some
> > > sort of thread safety tests, though that sounds like a hard problem to
> > > actually implement.
> > >
> > > However, it'd be easier to just start with class retention (or source
> > > retention) just for documentation purposes. Higher retention levels
> could
> > > be added later if an important use case came up.
> >
> > But which packaging option?
> >
> > Gary
> > >
> > > On 26 November 2016 at 19:56, Gary Gregory <ga...@gmail.com>
> > wrote:
> > >
> > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <se...@gmail.com> wrote:
> > > >
> > > > > On 26 November 2016 at 19:25, Gary Gregory <garydgregory@gmail.com
> >
> > > > wrote:
> > > > > > On a [crypto] thread, I mentioned http://pastebin.com/RKPGGdJ9
> to
> > add
> > > > > the
> > > > > > "classic" four javax.annotation.concurrent annotations to two
> > packages
> > > > > > (.clazz and .runtime) in Commons Lang for CLASS and RUNTIME
> > retentions.
> > > > > >
> > > > > > You'd use the CLASS version to avoid a hard dependency on [lang].
> > > > RUNTIME
> > > > > > to keep them around.
> > > > > >
> > > > > > We'd use the CLASS versions in all of Commons for documenting
> > thread
> > > > > safety.
> > > > > >
> > > > > > Thoughts?
> > > > >
> > > > > Definitely Class retention, not Runtime.
> > > > > You don't want to have to include the annotation jar on the runtime
> > > > > classpath.
> > > > >
> > > >
> > > > Hi Sebb,
> > > >
> > > > Right now I have both of these packages:
> > > >
> > > > - org.apache.commons.lang3.annotation.concurrent.clazz
> > > > - org.apache.commons.lang3.annotation.concurrent.runtime
> > > >
> > > > Each with a copy of:
> > > >
> > > > GuardedBy
> > > > Immutable
> > > > NotThreadSafe
> > > > ThreadSafe
> > > >
> > > > Should we include what I have as is?
> > > >
> > > > If we were to only provide the annotation at the CLASS retention
> level,
> > > > should we still package them in ...annotation.concurrent.clazz in
> case
> > we
> > > > want to provide annotation.concurrent.runtime later?
> > > >
> > > > If we know for certain we never want to provide RUNTIME retention, we
> > can
> > > > put them all in annotation.concurrent now.
> > > >
> > > > Thoughts?
> > > >
> > > > Gary
> > > >
> > > >
> > > >
> > > > > [I don't know why the annotations were ever considered suitable for
> > > > > runtime]
> > > > >
> > > > > > Gary
> > > > > >
> > > > > > --
> > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > > Java Persistence with Hibernate, Second Edition
> > > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > >
> > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> > > > > >
> > > > > > <http:////
> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > 1617290459>
> > > > > > JUnit in Action, Second Edition
> > > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > > linkCode=as2&tag=garygregory-20&linkId=
> > 31ecd1f6b6d1eaf8886ac902a24de4
> > > > 18%22
> > > > > >
> > > > > >
> > > > > > <http:////
> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > 1935182021>
> > > > > > Spring Batch in Action
> > > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > > <http:////
> > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > > 1935182951>
> > > > > > Blog: http://garygregory.wordpress.com
> > > > > > Home: http://garygregory.com/
> > > > > > Tweet! http://twitter.com/GaryGregory
> > > > >
> > > > > ------------------------------------------------------------
> > ---------
> > > > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > > For additional commands, e-mail: dev-help@commons.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > Java Persistence with Hibernate, Second Edition
> > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > > linkCode=as2&tag=garygregory-20&linkId=
> cadb800f39946ec62ea2b1af9fe6a2
> > b8>
> > > >
> > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> > > > 1617290459>
> > > > JUnit in Action, Second Edition
> > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > >
> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> 18%22
> > > > >
> > > >
> > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> > > > 1935182021>
> > > > Spring Batch in Action
> > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> > > > 1935182951>
> > > > Blog: http://garygregory.wordpress.com
> > > > Home: http://garygregory.com/
> > > > Tweet! http://twitter.com/GaryGregory
> > > >
> > >
> > >
> > >
> > > --
> > > Matt Sicker <bo...@gmail.com>
> >
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] Thread safety annotations

Posted by Matt Sicker <bo...@gmail.com>.
I think adding the additional clazz/runtime package would be a little
overkill if you only include one packaging option for now.

On 27 November 2016 at 00:04, Gary Gregory <ga...@gmail.com> wrote:

> On Nov 26, 2016 8:40 PM, "Matt Sicker" <bo...@gmail.com> wrote:
> >
> > I can think of a couple use cases for runtime retention for thread safety
> > annotations, but they're not specific to commons lang.
> >
> > 1. A framework could choose what type of data structure or algorithm to
> use
> > at runtime based on the presence of which thread safety annotation is on.
> > Same for mutability.
> > 2. A testing framework could use these annotations to try and automate
> some
> > sort of thread safety tests, though that sounds like a hard problem to
> > actually implement.
> >
> > However, it'd be easier to just start with class retention (or source
> > retention) just for documentation purposes. Higher retention levels could
> > be added later if an important use case came up.
>
> But which packaging option?
>
> Gary
> >
> > On 26 November 2016 at 19:56, Gary Gregory <ga...@gmail.com>
> wrote:
> >
> > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <se...@gmail.com> wrote:
> > >
> > > > On 26 November 2016 at 19:25, Gary Gregory <ga...@gmail.com>
> > > wrote:
> > > > > On a [crypto] thread, I mentioned http://pastebin.com/RKPGGdJ9 to
> add
> > > > the
> > > > > "classic" four javax.annotation.concurrent annotations to two
> packages
> > > > > (.clazz and .runtime) in Commons Lang for CLASS and RUNTIME
> retentions.
> > > > >
> > > > > You'd use the CLASS version to avoid a hard dependency on [lang].
> > > RUNTIME
> > > > > to keep them around.
> > > > >
> > > > > We'd use the CLASS versions in all of Commons for documenting
> thread
> > > > safety.
> > > > >
> > > > > Thoughts?
> > > >
> > > > Definitely Class retention, not Runtime.
> > > > You don't want to have to include the annotation jar on the runtime
> > > > classpath.
> > > >
> > >
> > > Hi Sebb,
> > >
> > > Right now I have both of these packages:
> > >
> > > - org.apache.commons.lang3.annotation.concurrent.clazz
> > > - org.apache.commons.lang3.annotation.concurrent.runtime
> > >
> > > Each with a copy of:
> > >
> > > GuardedBy
> > > Immutable
> > > NotThreadSafe
> > > ThreadSafe
> > >
> > > Should we include what I have as is?
> > >
> > > If we were to only provide the annotation at the CLASS retention level,
> > > should we still package them in ...annotation.concurrent.clazz in case
> we
> > > want to provide annotation.concurrent.runtime later?
> > >
> > > If we know for certain we never want to provide RUNTIME retention, we
> can
> > > put them all in annotation.concurrent now.
> > >
> > > Thoughts?
> > >
> > > Gary
> > >
> > >
> > >
> > > > [I don't know why the annotations were ever considered suitable for
> > > > runtime]
> > > >
> > > > > Gary
> > > > >
> > > > > --
> > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > > Java Persistence with Hibernate, Second Edition
> > > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > >
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> > > > >
> > > > > <http:////
> ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > 1617290459>
> > > > > JUnit in Action, Second Edition
> > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > > linkCode=as2&tag=garygregory-20&linkId=
> 31ecd1f6b6d1eaf8886ac902a24de4
> > > 18%22
> > > > >
> > > > >
> > > > > <http:////
> ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > 1935182021>
> > > > > Spring Batch in Action
> > > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > > <http:////
> ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > > 1935182951>
> > > > > Blog: http://garygregory.wordpress.com
> > > > > Home: http://garygregory.com/
> > > > > Tweet! http://twitter.com/GaryGregory
> > > >
> > > > ------------------------------------------------------------
> ---------
> > > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > > For additional commands, e-mail: dev-help@commons.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > Java Persistence with Hibernate, Second Edition
> > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
> b8>
> > >
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > 1617290459>
> > > JUnit in Action, Second Edition
> > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > >
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> > > >
> > >
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > 1935182021>
> > > Spring Batch in Action
> > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > 1935182951>
> > > Blog: http://garygregory.wordpress.com
> > > Home: http://garygregory.com/
> > > Tweet! http://twitter.com/GaryGregory
> > >
> >
> >
> >
> > --
> > Matt Sicker <bo...@gmail.com>
>



-- 
Matt Sicker <bo...@gmail.com>

Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
On Nov 26, 2016 8:40 PM, "Matt Sicker" <bo...@gmail.com> wrote:
>
> I can think of a couple use cases for runtime retention for thread safety
> annotations, but they're not specific to commons lang.
>
> 1. A framework could choose what type of data structure or algorithm to
use
> at runtime based on the presence of which thread safety annotation is on.
> Same for mutability.
> 2. A testing framework could use these annotations to try and automate
some
> sort of thread safety tests, though that sounds like a hard problem to
> actually implement.
>
> However, it'd be easier to just start with class retention (or source
> retention) just for documentation purposes. Higher retention levels could
> be added later if an important use case came up.

But which packaging option?

Gary
>
> On 26 November 2016 at 19:56, Gary Gregory <ga...@gmail.com> wrote:
>
> > On Sat, Nov 26, 2016 at 3:54 PM, sebb <se...@gmail.com> wrote:
> >
> > > On 26 November 2016 at 19:25, Gary Gregory <ga...@gmail.com>
> > wrote:
> > > > On a [crypto] thread, I mentioned http://pastebin.com/RKPGGdJ9 to
add
> > > the
> > > > "classic" four javax.annotation.concurrent annotations to two
packages
> > > > (.clazz and .runtime) in Commons Lang for CLASS and RUNTIME
retentions.
> > > >
> > > > You'd use the CLASS version to avoid a hard dependency on [lang].
> > RUNTIME
> > > > to keep them around.
> > > >
> > > > We'd use the CLASS versions in all of Commons for documenting thread
> > > safety.
> > > >
> > > > Thoughts?
> > >
> > > Definitely Class retention, not Runtime.
> > > You don't want to have to include the annotation jar on the runtime
> > > classpath.
> > >
> >
> > Hi Sebb,
> >
> > Right now I have both of these packages:
> >
> > - org.apache.commons.lang3.annotation.concurrent.clazz
> > - org.apache.commons.lang3.annotation.concurrent.runtime
> >
> > Each with a copy of:
> >
> > GuardedBy
> > Immutable
> > NotThreadSafe
> > ThreadSafe
> >
> > Should we include what I have as is?
> >
> > If we were to only provide the annotation at the CLASS retention level,
> > should we still package them in ...annotation.concurrent.clazz in case
we
> > want to provide annotation.concurrent.runtime later?
> >
> > If we know for certain we never want to provide RUNTIME retention, we
can
> > put them all in annotation.concurrent now.
> >
> > Thoughts?
> >
> > Gary
> >
> >
> >
> > > [I don't know why the annotations were ever considered suitable for
> > > runtime]
> > >
> > > > Gary
> > > >
> > > > --
> > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > Java Persistence with Hibernate, Second Edition
> > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > >
linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> > > >
> > > > <http:////
ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > 1617290459>
> > > > JUnit in Action, Second Edition
> > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> > 18%22
> > > >
> > > >
> > > > <http:////
ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > 1935182021>
> > > > Spring Batch in Action
> > > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > > <http:////
ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > > 1935182951>
> > > > Blog: http://garygregory.wordpress.com
> > > > Home: http://garygregory.com/
> > > > Tweet! http://twitter.com/GaryGregory
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > For additional commands, e-mail: dev-help@commons.apache.org
> > >
> > >
> >
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > Java Persistence with Hibernate, Second Edition
> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1617290459>
> > JUnit in Action, Second Edition
> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> >
linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> > >
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1935182021>
> > Spring Batch in Action
> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1935182951>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
> >
>
>
>
> --
> Matt Sicker <bo...@gmail.com>

Re: [lang] Thread safety annotations

Posted by Matt Sicker <bo...@gmail.com>.
I can think of a couple use cases for runtime retention for thread safety
annotations, but they're not specific to commons lang.

1. A framework could choose what type of data structure or algorithm to use
at runtime based on the presence of which thread safety annotation is on.
Same for mutability.
2. A testing framework could use these annotations to try and automate some
sort of thread safety tests, though that sounds like a hard problem to
actually implement.

However, it'd be easier to just start with class retention (or source
retention) just for documentation purposes. Higher retention levels could
be added later if an important use case came up.

On 26 November 2016 at 19:56, Gary Gregory <ga...@gmail.com> wrote:

> On Sat, Nov 26, 2016 at 3:54 PM, sebb <se...@gmail.com> wrote:
>
> > On 26 November 2016 at 19:25, Gary Gregory <ga...@gmail.com>
> wrote:
> > > On a [crypto] thread, I mentioned http://pastebin.com/RKPGGdJ9 to add
> > the
> > > "classic" four javax.annotation.concurrent annotations to two packages
> > > (.clazz and .runtime) in Commons Lang for CLASS and RUNTIME retentions.
> > >
> > > You'd use the CLASS version to avoid a hard dependency on [lang].
> RUNTIME
> > > to keep them around.
> > >
> > > We'd use the CLASS versions in all of Commons for documenting thread
> > safety.
> > >
> > > Thoughts?
> >
> > Definitely Class retention, not Runtime.
> > You don't want to have to include the annotation jar on the runtime
> > classpath.
> >
>
> Hi Sebb,
>
> Right now I have both of these packages:
>
> - org.apache.commons.lang3.annotation.concurrent.clazz
> - org.apache.commons.lang3.annotation.concurrent.runtime
>
> Each with a copy of:
>
> GuardedBy
> Immutable
> NotThreadSafe
> ThreadSafe
>
> Should we include what I have as is?
>
> If we were to only provide the annotation at the CLASS retention level,
> should we still package them in ...annotation.concurrent.clazz in case we
> want to provide annotation.concurrent.runtime later?
>
> If we know for certain we never want to provide RUNTIME retention, we can
> put them all in annotation.concurrent now.
>
> Thoughts?
>
> Gary
>
>
>
> > [I don't know why the annotations were ever considered suitable for
> > runtime]
> >
> > > Gary
> > >
> > > --
> > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > Java Persistence with Hibernate, Second Edition
> > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> > >
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1617290459>
> > > JUnit in Action, Second Edition
> > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> 18%22
> > >
> > >
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1935182021>
> > > Spring Batch in Action
> > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1935182951>
> > > Blog: http://garygregory.wordpress.com
> > > Home: http://garygregory.com/
> > > Tweet! http://twitter.com/GaryGregory
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
Matt Sicker <bo...@gmail.com>

Re: [lang] Thread safety annotations

Posted by Gary Gregory <ga...@gmail.com>.
On Sat, Nov 26, 2016 at 3:54 PM, sebb <se...@gmail.com> wrote:

> On 26 November 2016 at 19:25, Gary Gregory <ga...@gmail.com> wrote:
> > On a [crypto] thread, I mentioned http://pastebin.com/RKPGGdJ9 to add
> the
> > "classic" four javax.annotation.concurrent annotations to two packages
> > (.clazz and .runtime) in Commons Lang for CLASS and RUNTIME retentions.
> >
> > You'd use the CLASS version to avoid a hard dependency on [lang]. RUNTIME
> > to keep them around.
> >
> > We'd use the CLASS versions in all of Commons for documenting thread
> safety.
> >
> > Thoughts?
>
> Definitely Class retention, not Runtime.
> You don't want to have to include the annotation jar on the runtime
> classpath.
>

Hi Sebb,

Right now I have both of these packages:

- org.apache.commons.lang3.annotation.concurrent.clazz
- org.apache.commons.lang3.annotation.concurrent.runtime

Each with a copy of:

GuardedBy
Immutable
NotThreadSafe
ThreadSafe

Should we include what I have as is?

If we were to only provide the annotation at the CLASS retention level,
should we still package them in ...annotation.concurrent.clazz in case we
want to provide annotation.concurrent.runtime later?

If we know for certain we never want to provide RUNTIME retention, we can
put them all in annotation.concurrent now.

Thoughts?

Gary



> [I don't know why the annotations were ever considered suitable for
> runtime]
>
> > Gary
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > Java Persistence with Hibernate, Second Edition
> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> > JUnit in Action, Second Edition
> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> > Spring Batch in Action
> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [lang] Thread safety annotations

Posted by sebb <se...@gmail.com>.
On 26 November 2016 at 19:25, Gary Gregory <ga...@gmail.com> wrote:
> On a [crypto] thread, I mentioned http://pastebin.com/RKPGGdJ9 to add the
> "classic" four javax.annotation.concurrent annotations to two packages
> (.clazz and .runtime) in Commons Lang for CLASS and RUNTIME retentions.
>
> You'd use the CLASS version to avoid a hard dependency on [lang]. RUNTIME
> to keep them around.
>
> We'd use the CLASS versions in all of Commons for documenting thread safety.
>
> Thoughts?

Definitely Class retention, not Runtime.
You don't want to have to include the annotation jar on the runtime classpath.

[I don't know why the annotations were ever considered suitable for runtime]

> Gary
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory

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