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