[kaffe] Small kjc problem in BeanBug regression test
Guilhem Lavaux
guilhem at kaffe.org
Sat Aug 7 01:37:16 PDT 2004
Dalibor Topic wrote:
> Hi,
>
> the latest kjc in kaffe has a tiny problem that makes BeanBug.java
> regression test fail when the class library is compiled with kjc.
>
The problem comes from the multi-time interface analyser. The multiple
pass is needed to resolve all static initializer incrementally, the
problem is that here it doesn't regenerate the anonymous class. If the
java source file is compiled independently from the rest it builds all
anonymous classes without problems.
All these problems are deeply rooted on how kjc handles the initial
interfaces.
Cheers,
Guilhem.
> $ /tmp/topic/current/bin/kaffe BeanBug
> java.lang.NoSuchMethodError: java/awt/AWTKeyStroke$1.<init>(IFZ)V
> at java.lang.Class.forName (Class.java)
> at java.lang.Class.forName (Class.java:44)
> at BeanBug.main (BeanBug.java:12)
>
> The code in question is from java/awt/AWTKeyStroke.java
>
> 87 private static final LinkedHashMap cache = new
> LinkedHashMap(11, 0.75f
> 87 , true)
> 88 {
> 89 /** The largest the keystroke cache can grow. */
> 90 private static final int MAX_CACHE_SIZE = 2048;
> 91
> 92 /** Prune stale entries. */
> 93 protected boolean removeEldestEntry(Map.Entry eldest)
> 94 { // XXX - FIXME Use Map.Entry, not just Entry as gcj
> 3.1 workaro
> 94 und.
> 95 return size() > MAX_CACHE_SIZE;
> 96 }
> 97 };
>
> I seems that current kjc in kaffe does not generate the AWTKeyStroke$1
> class in question. It seems that kjc does generate the other two inner
> classes, though, it names them AWTKeyStroke$1 and AWTKeyStroke$2. So
> apparently the anonymous inner class which extends LinkedHashMap goes
> missing somehow.
>
> Jikes 1.21 generates all three inner classes.
>
> cheers,
> dalibor topic
>
> _______________________________________________
> kaffe mailing list
> kaffe at kaffe.org
> http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
>
More information about the kaffe
mailing list