[lang] Thread safety annotations

classic Classic list List threaded Threaded
57 messages Options
123
Reply | Threaded
Open this post in threaded view
|

[lang] Thread safety annotations

garydgregory
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: [hidden email] | [hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [lang] Thread safety annotations

sebb-2-2
On 26 November 2016 at 19:25, Gary Gregory <[hidden email]> 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]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [lang] Thread safety annotations

garydgregory
On Sat, Nov 26, 2016 at 3:54 PM, sebb <[hidden email]> wrote:

> On 26 November 2016 at 19:25, Gary Gregory <[hidden email]> 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: [hidden email] | [hidden email]
> > 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
E-Mail: [hidden email] | [hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [lang] Thread safety annotations

Matt Sicker
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 <[hidden email]> wrote:

> On Sat, Nov 26, 2016 at 3:54 PM, sebb <[hidden email]> wrote:
>
> > On 26 November 2016 at 19:25, Gary Gregory <[hidden email]>
> 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: [hidden email] | [hidden email]
> > > 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: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
>
> --
> E-Mail: [hidden email] | [hidden email]
> 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 <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: [lang] Thread safety annotations

garydgregory
On Nov 26, 2016 8:40 PM, "Matt Sicker" <[hidden email]> 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 <[hidden email]> wrote:
>
> > On Sat, Nov 26, 2016 at 3:54 PM, sebb <[hidden email]> wrote:
> >
> > > On 26 November 2016 at 19:25, Gary Gregory <[hidden email]>
> > 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: [hidden email] | [hidden email]
> > > > 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: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> > >
> >
> >
> > --
> > E-Mail: [hidden email] | [hidden email]
> > 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 <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: [lang] Thread safety annotations

Matt Sicker
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 <[hidden email]> wrote:

> On Nov 26, 2016 8:40 PM, "Matt Sicker" <[hidden email]> 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 <[hidden email]>
> wrote:
> >
> > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <[hidden email]> wrote:
> > >
> > > > On 26 November 2016 at 19:25, Gary Gregory <[hidden email]>
> > > 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: [hidden email] | [hidden email]
> > > > > 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: [hidden email]
> > > > For additional commands, e-mail: [hidden email]
> > > >
> > > >
> > >
> > >
> > > --
> > > E-Mail: [hidden email] | [hidden email]
> > > 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 <[hidden email]>
>



--
Matt Sicker <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: [lang] Thread safety annotations

garydgregory
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 <[hidden email]> 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 <[hidden email]> wrote:
>
> > On Nov 26, 2016 8:40 PM, "Matt Sicker" <[hidden email]> 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 <[hidden email]>
> > wrote:
> > >
> > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <[hidden email]> wrote:
> > > >
> > > > > On 26 November 2016 at 19:25, Gary Gregory <[hidden email]
> >
> > > > 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: [hidden email] | [hidden email]
> > > > > > 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: [hidden email]
> > > > > For additional commands, e-mail: [hidden email]
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > E-Mail: [hidden email] | [hidden email]
> > > > 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 <[hidden email]>
> >
>
>
>
> --
> Matt Sicker <[hidden email]>
>



--
E-Mail: [hidden email] | [hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [lang] Thread safety annotations

Benedikt Ritter-4
I thought we decided to abstain from documenting thread safety since it
would get outdated quickly anyway.

Gary Gregory <[hidden email]> 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 <[hidden email]> 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 <[hidden email]>
> wrote:
> >
> > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <[hidden email]> 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 <[hidden email]>
> > > wrote:
> > > >
> > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <[hidden email]> wrote:
> > > > >
> > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> [hidden email]
> > >
> > > > > 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: [hidden email] | [hidden email]
> > > > > > > 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: [hidden email]
> > > > > > For additional commands, e-mail: [hidden email]
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > E-Mail: [hidden email] | [hidden email]
> > > > > 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 <[hidden email]>
> > >
> >
> >
> >
> > --
> > Matt Sicker <[hidden email]>
> >
>
>
>
> --
> E-Mail: [hidden email] | [hidden email]
> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: [lang] Thread safety annotations

Matt Sicker
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 <[hidden email]> wrote:

> I thought we decided to abstain from documenting thread safety since it
> would get outdated quickly anyway.
>
> Gary Gregory <[hidden email]> 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 <[hidden email]> 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 <[hidden email]>
> > wrote:
> > >
> > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <[hidden email]> 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 <[hidden email]
> >
> > > > wrote:
> > > > >
> > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <[hidden email]> wrote:
> > > > > >
> > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> > [hidden email]
> > > >
> > > > > > 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: [hidden email] | [hidden email]
> > > > > > > > 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: [hidden email]
> > > > > > > For additional commands, e-mail: [hidden email]
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > E-Mail: [hidden email] | [hidden email]
> > > > > > 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 <[hidden email]>
> > > >
> > >
> > >
> > >
> > > --
> > > Matt Sicker <[hidden email]>
> > >
> >
> >
> >
> > --
> > E-Mail: [hidden email] | [hidden email]
> > 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 <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: [lang] Thread safety annotations

garydgregory
In reply to this post by Benedikt Ritter-4
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" <[hidden email]> wrote:

> I thought we decided to abstain from documenting thread safety since it
> would get outdated quickly anyway.
>
> Gary Gregory <[hidden email]> 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 <[hidden email]> 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 <[hidden email]>
> > wrote:
> > >
> > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <[hidden email]> 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 <[hidden email]
> >
> > > > wrote:
> > > > >
> > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <[hidden email]> wrote:
> > > > > >
> > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> > [hidden email]
> > > >
> > > > > > 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: [hidden email] | [hidden email]
> > > > > > > > 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: [hidden email]
> > > > > > > For additional commands, e-mail: [hidden email]
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > E-Mail: [hidden email] | [hidden email]
> > > > > > 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 <[hidden email]>
> > > >
> > >
> > >
> > >
> > > --
> > > Matt Sicker <[hidden email]>
> > >
> >
> >
> >
> > --
> > E-Mail: [hidden email] | [hidden email]
> > 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
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: [lang] Thread safety annotations

garydgregory
In reply to this post by Matt Sicker
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" <[hidden email]> 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 <[hidden email]> wrote:
>
> > I thought we decided to abstain from documenting thread safety since it
> > would get outdated quickly anyway.
> >
> > Gary Gregory <[hidden email]> 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 <[hidden email]>
> 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 <[hidden email]>
> > > wrote:
> > > >
> > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <[hidden email]> 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 <
> [hidden email]
> > >
> > > > > wrote:
> > > > > >
> > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <[hidden email]>
> wrote:
> > > > > > >
> > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> > > [hidden email]
> > > > >
> > > > > > > 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: [hidden email] | [hidden email]
> > > > > > > > > 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: [hidden email]
> > > > > > > > For additional commands, e-mail: [hidden email]
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > E-Mail: [hidden email] | [hidden email]
> > > > > > > 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 <[hidden email]>
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Matt Sicker <[hidden email]>
> > > >
> > >
> > >
> > >
> > > --
> > > E-Mail: [hidden email] | [hidden email]
> > > 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 <[hidden email]>
>
Reply | Threaded
Open this post in threaded view
|

Re: [lang] Thread safety annotations

Benedikt Ritter-4
Hi,

Gary Gregory <[hidden email]> 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" <[hidden email]> 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 <[hidden email]>
> wrote:
> >
> > > I thought we decided to abstain from documenting thread safety since it
> > > would get outdated quickly anyway.
> > >
> > > Gary Gregory <[hidden email]> 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 <[hidden email]>
> > 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 <[hidden email]
> >
> > > > wrote:
> > > > >
> > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <[hidden email]> 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 <
> > [hidden email]
> > > >
> > > > > > wrote:
> > > > > > >
> > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <[hidden email]>
> > wrote:
> > > > > > > >
> > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> > > > [hidden email]
> > > > > >
> > > > > > > > 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: [hidden email] | [hidden email]
> > > > > > > > > > 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: [hidden email]
> > > > > > > > > For additional commands, e-mail:
> [hidden email]
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > E-Mail: [hidden email] | [hidden email]
> > > > > > > > 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 <[hidden email]>
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Matt Sicker <[hidden email]>
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > E-Mail: [hidden email] | [hidden email]
> > > > 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 <[hidden email]>
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: [lang] Thread safety annotations

garydgregory
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 <[hidden email]> wrote:

> Hi,
>
> Gary Gregory <[hidden email]> 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" <[hidden email]> 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 <[hidden email]>
> > wrote:
> > >
> > > > I thought we decided to abstain from documenting thread safety since
> it
> > > > would get outdated quickly anyway.
> > > >
> > > > Gary Gregory <[hidden email]> 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 <[hidden email]>
> > > 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 <
> [hidden email]
> > >
> > > > > wrote:
> > > > > >
> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <[hidden email]>
> 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 <
> > > [hidden email]
> > > > >
> > > > > > > wrote:
> > > > > > > >
> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <[hidden email]>
> > > wrote:
> > > > > > > > >
> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> > > > > [hidden email]
> > > > > > >
> > > > > > > > > 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: [hidden email] | [hidden email]
> > > > > > > > > > > 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:
> > [hidden email]
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > E-Mail: [hidden email] | [hidden email]
> > > > > > > > > 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 <[hidden email]>
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Matt Sicker <[hidden email]>
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > E-Mail: [hidden email] | [hidden email]
> > > > > 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 <[hidden email]>
> > >
> >
>



--
E-Mail: [hidden email] | [hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [lang] Thread safety annotations

sebb-2-2
On 27 November 2016 at 22:03, Gary Gregory <[hidden email]> 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 <[hidden email]> wrote:
>
>> Hi,
>>
>> Gary Gregory <[hidden email]> 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" <[hidden email]> 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 <[hidden email]>
>> > wrote:
>> > >
>> > > > I thought we decided to abstain from documenting thread safety since
>> it
>> > > > would get outdated quickly anyway.
>> > > >
>> > > > Gary Gregory <[hidden email]> 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 <[hidden email]>
>> > > 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 <
>> [hidden email]
>> > >
>> > > > > wrote:
>> > > > > >
>> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <[hidden email]>
>> 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 <
>> > > [hidden email]
>> > > > >
>> > > > > > > wrote:
>> > > > > > > >
>> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <[hidden email]>
>> > > wrote:
>> > > > > > > > >
>> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
>> > > > > [hidden email]
>> > > > > > >
>> > > > > > > > > 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: [hidden email] | [hidden email]
>> > > > > > > > > > > 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:
>> > [hidden email]
>> > > > > > > > > >
>> > > > > > > > > >
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > > --
>> > > > > > > > > E-Mail: [hidden email] | [hidden email]
>> > > > > > > > > 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 <[hidden email]>
>> > > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > --
>> > > > > > Matt Sicker <[hidden email]>
>> > > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > > --
>> > > > > E-Mail: [hidden email] | [hidden email]
>> > > > > 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 <[hidden email]>
>> > >
>> >
>>
>
>
>
> --
> E-Mail: [hidden email] | [hidden email]
> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [lang] Thread safety annotations

garydgregory
On Sun, Nov 27, 2016 at 2:14 PM, sebb <[hidden email]> wrote:

> On 27 November 2016 at 22:03, Gary Gregory <[hidden email]> 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 <[hidden email]>
> wrote:
> >
> >> Hi,
> >>
> >> Gary Gregory <[hidden email]> 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" <[hidden email]> 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 <[hidden email]>
> >> > wrote:
> >> > >
> >> > > > I thought we decided to abstain from documenting thread safety
> since
> >> it
> >> > > > would get outdated quickly anyway.
> >> > > >
> >> > > > Gary Gregory <[hidden email]> 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 <[hidden email]
> >
> >> > > 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 <
> >> [hidden email]
> >> > >
> >> > > > > wrote:
> >> > > > > >
> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <[hidden email]>
> >> 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 <
> >> > > [hidden email]
> >> > > > >
> >> > > > > > > wrote:
> >> > > > > > > >
> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <[hidden email]
> >
> >> > > wrote:
> >> > > > > > > > >
> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> >> > > > > [hidden email]
> >> > > > > > >
> >> > > > > > > > > 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: [hidden email] |
> [hidden email]
> >> > > > > > > > > > > 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:
> >> > [hidden email]
> >> > > > > > > > > >
> >> > > > > > > > > >
> >> > > > > > > > >
> >> > > > > > > > >
> >> > > > > > > > > --
> >> > > > > > > > > E-Mail: [hidden email] | [hidden email]
> >> > > > > > > > > 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 <[hidden email]>
> >> > > > > > >
> >> > > > > >
> >> > > > > >
> >> > > > > >
> >> > > > > > --
> >> > > > > > Matt Sicker <[hidden email]>
> >> > > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > > --
> >> > > > > E-Mail: [hidden email] | [hidden email]
> >> > > > > 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 <[hidden email]>
> >> > >
> >> >
> >>
> >
> >
> >
> > --
> > E-Mail: [hidden email] | [hidden email]
> > 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
E-Mail: [hidden email] | [hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [lang] Thread safety annotations

sebb-2-2
On 27 November 2016 at 22:31, Gary Gregory <[hidden email]> wrote:

> On Sun, Nov 27, 2016 at 2:14 PM, sebb <[hidden email]> wrote:
>
>> On 27 November 2016 at 22:03, Gary Gregory <[hidden email]> 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 <[hidden email]>
>> wrote:
>> >
>> >> Hi,
>> >>
>> >> Gary Gregory <[hidden email]> 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" <[hidden email]> 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 <[hidden email]>
>> >> > wrote:
>> >> > >
>> >> > > > I thought we decided to abstain from documenting thread safety
>> since
>> >> it
>> >> > > > would get outdated quickly anyway.
>> >> > > >
>> >> > > > Gary Gregory <[hidden email]> 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 <[hidden email]
>> >
>> >> > > 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 <
>> >> [hidden email]
>> >> > >
>> >> > > > > wrote:
>> >> > > > > >
>> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <[hidden email]>
>> >> 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 <
>> >> > > [hidden email]
>> >> > > > >
>> >> > > > > > > wrote:
>> >> > > > > > > >
>> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <[hidden email]
>> >
>> >> > > wrote:
>> >> > > > > > > > >
>> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
>> >> > > > > [hidden email]
>> >> > > > > > >
>> >> > > > > > > > > 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: [hidden email] |
>> [hidden email]
>> >> > > > > > > > > > > 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:
>> >> > [hidden email]
>> >> > > > > > > > > >
>> >> > > > > > > > > >
>> >> > > > > > > > >
>> >> > > > > > > > >
>> >> > > > > > > > > --
>> >> > > > > > > > > E-Mail: [hidden email] | [hidden email]
>> >> > > > > > > > > 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 <[hidden email]>
>> >> > > > > > >
>> >> > > > > >
>> >> > > > > >
>> >> > > > > >
>> >> > > > > > --
>> >> > > > > > Matt Sicker <[hidden email]>
>> >> > > > > >
>> >> > > > >
>> >> > > > >
>> >> > > > >
>> >> > > > > --
>> >> > > > > E-Mail: [hidden email] | [hidden email]
>> >> > > > > 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 <[hidden email]>
>> >> > >
>> >> >
>> >>
>> >
>> >
>> >
>> > --
>> > E-Mail: [hidden email] | [hidden email]
>> > 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: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
> --
> E-Mail: [hidden email] | [hidden email]
> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [lang] Thread safety annotations

garydgregory
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 <[hidden email]> wrote:

> On 27 November 2016 at 22:31, Gary Gregory <[hidden email]> wrote:
> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <[hidden email]> wrote:
> >
> >> On 27 November 2016 at 22:03, Gary Gregory <[hidden email]>
> 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 <[hidden email]>
> >> wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> Gary Gregory <[hidden email]> 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" <[hidden email]> 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 <
> [hidden email]>
> >> >> > wrote:
> >> >> > >
> >> >> > > > I thought we decided to abstain from documenting thread safety
> >> since
> >> >> it
> >> >> > > > would get outdated quickly anyway.
> >> >> > > >
> >> >> > > > Gary Gregory <[hidden email]> 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 <
> [hidden email]
> >> >
> >> >> > > 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 <
> >> >> [hidden email]
> >> >> > >
> >> >> > > > > wrote:
> >> >> > > > > >
> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <[hidden email]
> >
> >> >> 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 <
> >> >> > > [hidden email]
> >> >> > > > >
> >> >> > > > > > > wrote:
> >> >> > > > > > > >
> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <
> [hidden email]
> >> >
> >> >> > > wrote:
> >> >> > > > > > > > >
> >> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> >> >> > > > > [hidden email]
> >> >> > > > > > >
> >> >> > > > > > > > > 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: [hidden email] |
> >> [hidden email]
> >> >> > > > > > > > > > > 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:
> >> >> > [hidden email]
> >> >> > > > > > > > > >
> >> >> > > > > > > > > >
> >> >> > > > > > > > >
> >> >> > > > > > > > >
> >> >> > > > > > > > > --
> >> >> > > > > > > > > E-Mail: [hidden email] | [hidden email]
> >> >> > > > > > > > > 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 <[hidden email]>
> >> >> > > > > > >
> >> >> > > > > >
> >> >> > > > > >
> >> >> > > > > >
> >> >> > > > > > --
> >> >> > > > > > Matt Sicker <[hidden email]>
> >> >> > > > > >
> >> >> > > > >
> >> >> > > > >
> >> >> > > > >
> >> >> > > > > --
> >> >> > > > > E-Mail: [hidden email] | [hidden email]
> >> >> > > > > 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 <[hidden email]>
> >> >> > >
> >> >> >
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > E-Mail: [hidden email] | [hidden email]
> >> > 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: [hidden email]
> >> For additional commands, e-mail: [hidden email]
> >>
> >>
> >
> >
> > --
> > E-Mail: [hidden email] | [hidden email]
> > 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
E-Mail: [hidden email] | [hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [lang] Thread safety annotations

Peter Ansell
In reply to this post by sebb-2-2
On 28 November 2016 at 10:41, sebb <[hidden email]> wrote:

> On 27 November 2016 at 22:31, Gary Gregory <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [lang] Thread safety annotations

garydgregory
In reply to this post by sebb-2-2
On Sun, Nov 27, 2016 at 3:41 PM, sebb <[hidden email]> wrote:

> On 27 November 2016 at 22:31, Gary Gregory <[hidden email]> wrote:
> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <[hidden email]> wrote:
> >
> >> On 27 November 2016 at 22:03, Gary Gregory <[hidden email]>
> 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 <[hidden email]>
> >> wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> Gary Gregory <[hidden email]> 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" <[hidden email]> 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 <
> [hidden email]>
> >> >> > wrote:
> >> >> > >
> >> >> > > > I thought we decided to abstain from documenting thread safety
> >> since
> >> >> it
> >> >> > > > would get outdated quickly anyway.
> >> >> > > >
> >> >> > > > Gary Gregory <[hidden email]> 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 <
> [hidden email]
> >> >
> >> >> > > 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 <
> >> >> [hidden email]
> >> >> > >
> >> >> > > > > wrote:
> >> >> > > > > >
> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <[hidden email]
> >
> >> >> 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 <
> >> >> > > [hidden email]
> >> >> > > > >
> >> >> > > > > > > wrote:
> >> >> > > > > > > >
> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <
> [hidden email]
> >> >
> >> >> > > wrote:
> >> >> > > > > > > > >
> >> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
> >> >> > > > > [hidden email]
> >> >> > > > > > >
> >> >> > > > > > > > > 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: [hidden email] |
> >> [hidden email]
> >> >> > > > > > > > > > > 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:
> >> >> > [hidden email]
> >> >> > > > > > > > > >
> >> >> > > > > > > > > >
> >> >> > > > > > > > >
> >> >> > > > > > > > >
> >> >> > > > > > > > > --
> >> >> > > > > > > > > E-Mail: [hidden email] | [hidden email]
> >> >> > > > > > > > > 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 <[hidden email]>
> >> >> > > > > > >
> >> >> > > > > >
> >> >> > > > > >
> >> >> > > > > >
> >> >> > > > > > --
> >> >> > > > > > Matt Sicker <[hidden email]>
> >> >> > > > > >
> >> >> > > > >
> >> >> > > > >
> >> >> > > > >
> >> >> > > > > --
> >> >> > > > > E-Mail: [hidden email] | [hidden email]
> >> >> > > > > 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 <[hidden email]>
> >> >> > >
> >> >> >
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > E-Mail: [hidden email] | [hidden email]
> >> > 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: [hidden email]
> >> For additional commands, e-mail: [hidden email]
> >>
> >>
> >
> >
> > --
> > E-Mail: [hidden email] | [hidden email]
> > 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
E-Mail: [hidden email] | [hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [lang] Thread safety annotations

garydgregory
On Sun, Nov 27, 2016 at 3:51 PM, Gary Gregory <[hidden email]>
wrote:

> On Sun, Nov 27, 2016 at 3:41 PM, sebb <[hidden email]> wrote:
>
>> On 27 November 2016 at 22:31, Gary Gregory <[hidden email]>
>> wrote:
>> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <[hidden email]> wrote:
>> >
>> >> On 27 November 2016 at 22:03, Gary Gregory <[hidden email]>
>> 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 <[hidden email]
>> >
>> >> wrote:
>> >> >
>> >> >> Hi,
>> >> >>
>> >> >> Gary Gregory <[hidden email]> 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" <[hidden email]> 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 <
>> [hidden email]>
>> >> >> > wrote:
>> >> >> > >
>> >> >> > > > I thought we decided to abstain from documenting thread safety
>> >> since
>> >> >> it
>> >> >> > > > would get outdated quickly anyway.
>> >> >> > > >
>> >> >> > > > Gary Gregory <[hidden email]> 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 <
>> [hidden email]
>> >> >
>> >> >> > > 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 <
>> >> >> [hidden email]
>> >> >> > >
>> >> >> > > > > wrote:
>> >> >> > > > > >
>> >> >> > > > > > > On Nov 26, 2016 8:40 PM, "Matt Sicker" <
>> [hidden email]>
>> >> >> 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 <
>> >> >> > > [hidden email]
>> >> >> > > > >
>> >> >> > > > > > > wrote:
>> >> >> > > > > > > >
>> >> >> > > > > > > > > On Sat, Nov 26, 2016 at 3:54 PM, sebb <
>> [hidden email]
>> >> >
>> >> >> > > wrote:
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > > On 26 November 2016 at 19:25, Gary Gregory <
>> >> >> > > > > [hidden email]
>> >> >> > > > > > >
>> >> >> > > > > > > > > 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: [hidden email] |
>> >> [hidden email]
>> >> >> > > > > > > > > > > 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:
>> >> >> > [hidden email]
>> >> >> > > > > > > > > >
>> >> >> > > > > > > > > >
>> >> >> > > > > > > > >
>> >> >> > > > > > > > >
>> >> >> > > > > > > > > --
>> >> >> > > > > > > > > E-Mail: [hidden email] |
>> [hidden email]
>> >> >> > > > > > > > > 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 <[hidden email]>
>> >> >> > > > > > >
>> >> >> > > > > >
>> >> >> > > > > >
>> >> >> > > > > >
>> >> >> > > > > > --
>> >> >> > > > > > Matt Sicker <[hidden email]>
>> >> >> > > > > >
>> >> >> > > > >
>> >> >> > > > >
>> >> >> > > > >
>> >> >> > > > > --
>> >> >> > > > > E-Mail: [hidden email] | [hidden email]
>> >> >> > > > > 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 <[hidden email]>
>> >> >> > >
>> >> >> >
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > E-Mail: [hidden email] | [hidden email]
>> >> > 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: [hidden email]
>> >> For additional commands, e-mail: [hidden email]
>> >>
>> >>
>> >
>> >
>> > --
>> > E-Mail: [hidden email] | [hidden email]
>> > 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: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
> --
> E-Mail: [hidden email] | [hidden email]
> 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: [hidden email] | [hidden email]
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
123