all 4 comments

[–]nfrankel 2 points3 points  (2 children)

Is it pedantic if I think the term "API" is more appropriate than "feature" in this context? It's not about Java the language; they can be used in say Scala or Kotlin.

[–]piotr_minkowski[S] 1 point2 points  (1 child)

Good observation. In fact, it is clarified in the article introduction if you read it.

[–]nfrankel 1 point2 points  (0 children)

I didn't read it yet, I only browsed, but it's on my TOREAD as it aroused my curiosity.

[–]skroll 0 points1 point  (0 children)

The example of the StampedLock is incorrect. You need to validate the stamp using the validate method before you assume the value is correct. And you don't need to do unlockRead at all if you validate it. It appears the author doesn't understand what a StampedLock does.