harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Beyer" <nbe...@kc.rr.com>
Subject [build] Use Sun 5.0_8 or Eclipse Compiler for automated builds
Date Wed, 06 Sep 2006 20:11:43 GMT
Would there be any objections to asking the automated builds (that send
messages to the commit list) to use either the latest Sun compiler (5.0_8)
or the Eclipse compiler?

 

There are a number of places that use ReferenceQueues and Reference, but
can't be generified because of a bug in the Sun compilers prior to 5.0_8. At
the end of this email is an example of code that causes a compiler error in
previous releases. This issue does not affect the Eclipse compiler. I've run
a full rebuild as of revision 440796 and everything compiles fine with both
the Eclipse compiler and Sun 5.0_8 compiler.

 

-Nathan

 

 

    private static final ReferenceQueue<Object> cacheQueue = new
ReferenceQueue<Object>();

 

    private static final class CacheEntry extends WeakReference<Object> {

        String key;

 

        CacheEntry(Object jar, String key, ReferenceQueue<Object> queue) {

            super(jar, queue);

            this.key = key;

        }

    }

 

    // ... code using the queue

 

            CacheEntry entry;

            // This cast fails on Sun 5.0_7 and prior compilers

            while ((entry = (CacheEntry)cacheQueue.poll()) != null) {

                jarCache.remove(entry.key);

            }

 

    // . more code

 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message