commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: [LANG] Feedback from ApacheCON Europe
Date Wed, 23 Nov 2016 00:04:49 GMT
An interesting question is whether we should provide a copy of the
annotations scoped as RUNTIME, which was the original way the code was
published out of the JCIP book.

For our use case within Commons, we want a CLASS or SOURCE level
dependency. We do not want RUNTIME because we do not want a hard dependency
on Commons Lang from other Commons components.

Gary

On Tue, Nov 22, 2016 at 2:23 PM, Gary Gregory <garydgregory@gmail.com>
wrote:

> It would if the Google version or ours is signed. It also would be a
> problem if we used a different retention level from Google's.
>
> Maybe using our own in o.a.c.lang3 would be less confusing all around.
>
> Gary
>
> On Tue, Nov 22, 2016 at 2:15 PM, Matt Sicker <boards@gmail.com> wrote:
>
>> Would packaging them in the JSR package name inside commons lang cause
>> classpath issues if you include the google copy?
>>
>> On 22 November 2016 at 15:53, Gary Gregory <garydgregory@gmail.com>
>> wrote:
>>
>> > 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 <boards@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 <garydgregory@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 <
>> britter@apache.org>
>> > > > wrote:
>> > > >
>> > > > > Hello,
>> > > > >
>> > > > > Gary Gregory <garydgregory@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 <
>> > britter@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: garydgregory@gmail.com | ggregory@apache.org
>> > > > > > Java Persistence with Hibernate, Second Edition
>> > > > > > <
>> > > > > > https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> > > > > linkCode=as2&tag=garygregory-20&linkId=
>> > cadb800f39946ec62ea2b1af9fe6a2
>> > > b8
>> > > > > > >
>> > > > > >
>> > > > > > <http:////
>> > > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> > > a=1617290459
>> > > > >
>> > > > > > JUnit in Action, Second Edition
>> > > > > > <
>> > > > > > https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> > > > > linkCode=as2&tag=garygregory-20&linkId=
>> > 31ecd1f6b6d1eaf8886ac902a24de4
>> > > > 18%22
>> > > > > > >
>> > > > > >
>> > > > > > <http:////
>> > > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> > > a=1935182021
>> > > > >
>> > > > > > Spring Batch in Action
>> > > > > > <
>> > > > > > https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> > > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> > > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action
>> > > > > > >
>> > > > > > <http:////
>> > > > > > ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
>> > > a=1935182951
>> > > > >
>> > > > > > Blog: http://garygregory.wordpress.com
>> > > > > > Home: http://garygregory.com/
>> > > > > > Tweet! http://twitter.com/GaryGregory
>> > > > > >
>> > > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > > > Java Persistence with Hibernate, Second Edition
>> > > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> > > > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b
>> 1af9fe6a2
>> > 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=31ecd1f6b6d1eaf8886ac
>> 902a24de4
>> > > 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 <boards@gmail.com>
>> > >
>> >
>> >
>> >
>> > --
>> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > Java Persistence with Hibernate, Second Edition
>> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b
>> 1af9fe6a2b8>
>> >
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> > 1617290459>
>> > JUnit in Action, Second Edition
>> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac
>> 902a24de418%22
>> > >
>> >
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> > 1935182021>
>> > Spring Batch in Action
>> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> > 1935182951>
>> > Blog: http://garygregory.wordpress.com
>> > Home: http://garygregory.com/
>> > Tweet! http://twitter.com/GaryGregory
>> >
>>
>>
>>
>> --
>> Matt Sicker <boards@gmail.com>
>>
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



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

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

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

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