Should we: - package these (three) annotations per the JSR package name, or, - in o.a.c.lang3, or, - should we depend on a jar like https://search.maven.org/#artifactdetails%7Ccom.google.code.findbugs%7Cjsr305%7C3.0.1%7Cjar
? Gary On Tue, Nov 22, 2016 at 1:47 PM, Matt Sicker <boa...@gmail.com> wrote: > It's at least pretty standard (being a JSR and all), plus no runtime > dependency, I don't see why not! > > On 22 November 2016 at 15:36, Gary Gregory <garydgreg...@gmail.com> wrote: > > > Maybe we could start with adding these three annotations to [lang] with > > Class retention which does not create a runtime dependency. Then we can > use > > them all over Commons. > > > > WDYT? > > > > Gary > > > > On Tue, Nov 22, 2016 at 11:39 AM, Benedikt Ritter <brit...@apache.org> > > wrote: > > > > > Hello, > > > > > > Gary Gregory <garydgreg...@gmail.com> schrieb am So., 20. Nov. 2016 um > > > 16:50 Uhr: > > > > > > > Let's recognize that these annotations can give you a false sense of > > > > confidence, you still should read at least the docs and probably the > > code > > > > if you REALLY care about thread safety. > > > > > > > > > > I thought about this again today on my way to work and came up with the > > > same conclusion. > > > > > > > > > > > > > > There will be mistakes in documentation where the wrong or > > contradictory > > > > annotation will split in and/or will be out of sync with Javadocs. At > > > least > > > > that's what is likely to happen _over time_. > > > > > > > > > > agreed. > > > > > > > > > > > > > > IOW, its a nice idea but not a panacea for actual thread safety. > > > > > > > > > > agreed. > > > > > > > > > > > > > > The other issue is that if we are serious about this we are going to > > end > > > up > > > > with the same annotations in all Commons packages. We could reuse > > > > javax.annotation.concurrent from JSR 305 as published in > > > > > > > > https://search.maven.org/#artifactdetails%7Ccom.google. > > > code.findbugs%7Cjsr305%7C3.0.1%7Cjar > > > > (CLASS level retention). > > > > > > > > > > The logical conclusion from your comments above would imply to put some > > > tests or static code analysis in place which can verify whether the > real > > > thread safety properties match the documented ones. I'm not aware of > any > > > tool which can do that. > > > > > > So maybe should rather document why we don't document thread safety :-) > > > > > > Benedikt > > > > > > > > > > > > > > Gary > > > > > > > > On Sat, Nov 19, 2016 at 3:52 AM, Benedikt Ritter <brit...@apache.org > > > > > > wrote: > > > > > > > > > Hi, > > > > > > > > > > after my presentation about Apache Commons, there where some > comments > > > > about > > > > > [lang]. One person said, that it is hard to find out whether our > > > classes > > > > > are threadsafe or not. He would like to see that better documented. > > > > > > > > > > I know that sebb has done some work in that direction, but as far > as > > I > > > > know > > > > > the information about thread safety is currently only in Java > > comments. > > > > > > > > > > How can we improve our docs with regards to thread safety? I see > > > several > > > > > ways: > > > > > - Custom annotations like @Immutable, @ThreadSafe, @NotThreadSafe > > > > > - Custom JavaDoc doclets > > > > > - Put the information right into the JavaDoc > > > > > > > > > > Anything else? > > > > > > > > > > Benedikt > > > > > > > > > > > > > > > > > > > > > -- > > > > 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 > > > > > > > > > > > > > > > -- > > 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 > > > > > > -- > 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