RFR [9] 8140687: Move @Contended to the jdk.internal.vm.annotation package

Chris Hegarty chris.hegarty at oracle.com
Mon Nov 9 13:53:42 UTC 2015


On 09/11/15 12:34, Peter Levart wrote:
>
>
> On 11/09/2015 01:32 PM, Peter Levart wrote:
>>
>>
>> On 11/09/2015 11:43 AM, Chris Hegarty wrote:
>>> On 02/11/15 10:45, Aleksey Shipilev wrote:
>>>> On 11/02/2015 02:56 AM, Chris Hegarty wrote:
>>>>> In line with the intended location for other VM annotations,
>>>>> see 8138732 [1], @sun.misc.Contended should be moved
>>>>> to the jdk.internal.vm.annotation package.
>>>>>
>>>>> http://cr.openjdk.java.net/~chegar/8140687/00/
>>>>
>>>> Changes look good to me.
>>>>
>>>> But what's the compatibility story for JSR 166? With this move, we
>>>> would
>>>> be unable to bootclasspath JSR 166 JAR, since it references the "old"
>>>> sun.misc.Contended?
>>>
>>> Correct.
>>>
>>> As you are aware, the 166 CVS will fork shortly to support
>>> a JDK 9 only version. Artifacts built from the fork are of
>>> course not impacted by this change.
>>>
>>> For existing 166 artifacts, they will not run on JDK 9 as
>>> the Contended annotation will not be present.
>>
>> Note that they might actually be able to run. They would just not be
>> @Contended. As I understand, VM just checks the presence of
>> annotations by string value - it doesn't try to materialize them in
>> the form of objects, so it does not fail.

Correct Peter. It does not fail. The annotation is just ignored.

> The possible solution would be for VM to support both annotations as
> aliases for some time.

That is possible, but I don't see this as a such an
important issue that it is worth the added complication,
given that there will be a JDK 9 specific 166 artifact
anyway.

-Chris.

>>
>> Regards, Peter
>>
>>>
>>> -Chris.
>>>
>>>> Thanks,
>>>> -Aleksey
>>>>
>>
>



More information about the core-libs-dev mailing list