commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <>
Subject Re: [LANG] Feedback from ApacheCON Europe
Date Sun, 20 Nov 2016 15:50:48 GMT
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.

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_.

IOW, its a nice idea but not a panacea for actual thread safety.

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
(CLASS level retention).


On Sat, Nov 19, 2016 at 3:52 AM, Benedikt Ritter <> 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: |
Java Persistence with Hibernate, Second Edition

JUnit in Action, Second Edition

Spring Batch in Action

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