[concurrency-interest] Java 6 support in backport-concurrent

Holger Hoffstätte holger at wizards.de
Tue Aug 14 02:52:05 EDT 2007


David Holmes wrote:
> Greg,
> 
> This error doesn't make sense.

It sure does!

> Caused by: java.lang.VerifyError: class
>  edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicInteger
>  overrides final method lazySet.(I)V
> 
> The backport AtomicInteger class doesn't override lazySet, it defines it. It
> also has no superclass other than Object to be verified against.
> 
> It's almost as if the verifier thinks the backport version of AtomicInteger
> extends the j.u.c version.

There are several backport "flavors" and in the JDK5 version the backport
classes indeed extend some native classes. In JDK6 some methods in
AbstractOwnableQueuedSynchronizer were made final (among them lazySet()),
so the "half-native" JDK5 backport does not load anymore on JDK6.

I sent the attached patch to Dawid in March and he wanted to incorporate
it to make a JDK6 flavored backport, but so far it seems that has not
happened (/nudge). Would be really nice to have, I just started to use
EHCache as well..

Anybody who needs a Java6 backport lib can just apply the patch to the
backport 3.0 source or get a prebuilt bundle here:
http://hoho.dyndns.org/~holger/dist/backport-util-concurrent-3.0-jdk6.zip

Holger
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: buc-jdk6.patch
Url: /pipermail/attachments/20070814/b79ddaf0/attachment.ksh 


More information about the Concurrency-interest mailing list