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

David Holmes dcholmes at optusnet.com.au
Wed Aug 15 19:40:17 EDT 2007


Thanks for pointing out the different backport flavors.

Holger Hoffstätte writes:
> David Holmes wrote:
> > 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.
> >
> 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.

AbstractOwnableSynchronizer  does not have a lazySet method, lazySet is a
new method for the Atomic* classes in JDK 6.  I presume what you meant is
that the JDK 5 version of the backport has its AtomicInteger extend
j.u.c.a.AtomicInteger and adds the jsr166x methods, which would explain the
problem when used in JDK 6.

David Holmes

More information about the Concurrency-interest mailing list