atom feed19 messages in edu.oswego.cs.concurrency-interestRe: [concurrency-interest] The Atomic...
FromSent OnAttachments
David M. LloydJul 14, 2012 11:01 am 
Doug LeaJul 14, 2012 11:17 am 
Stanimir SimeonoffJul 14, 2012 1:01 pm 
√iktor ҠlangJul 14, 2012 1:16 pm 
Rémi ForaxJul 14, 2012 2:20 pm 
Stanimir SimeonoffJul 14, 2012 2:58 pm 
Rémi ForaxJul 14, 2012 3:44 pm 
Doug LeaJul 15, 2012 3:37 am 
David HolmesJul 15, 2012 4:14 am 
√iktor ҠlangJul 15, 2012 8:22 am 
David M. LloydJul 15, 2012 9:19 am 
Jed Wesley-SmithJul 15, 2012 7:31 pm 
David HolmesJul 15, 2012 7:35 pm 
David M. LloydJul 15, 2012 7:43 pm 
David HolmesJul 15, 2012 7:52 pm 
Jason T. GreeneJul 20, 2012 11:42 am 
David HolmesJul 20, 2012 6:34 pm 
David M. LloydJul 22, 2012 1:47 pm 
Doug LeaJul 23, 2012 3:44 am 
Subject:Re: [concurrency-interest] The Atomic*FieldUpdater situation
From:Doug Lea (
Date:Jul 23, 2012 3:44:28 am

On 07/22/12 16:47, David M. Lloyd wrote:

I still don't get why this needs to operate any differently than reflection. With reflection I can do the same thing in Backdoor. I just make a call to setAccessible, and a security check is done with a security manager. Why can't the updaters do the same?

This is a good point. Among the ideas for internal overhaul would be to build special versions for fields that have been marked setAccessible.

I am holding out some hope that between this and use of upcoming indy extensions, we might be able to provide much better versions. (Although ultimately, the only way to do this completely seamlessly would be to add bytecodes and front-end compiler support.)

Until then, I'm not especially tempted to create band-aid version. The mechanics available are very fragile. When introducing and revising these, we've had many exchanges with Java security folks who are insistent about the use of particular constructions. They do tend to be very conservative, but that's mainly because this is hard to get exactly right, especially in the presence of erased generics.

However, in the mean time, it would be completely possible for you to create your own AccessibleAtomicXFieldUpdater classes (so long as you have access to Unsafe) and use them.