[kaffe] kaffe/kaffevm/readClass.c: Should class version 1.5 be supported?

Guilhem Lavaux guilhem at kaffe.org
Tue Apr 3 11:31:40 PDT 2007

Hi Ito,

Thanks for making the test. Yes. Kaffe normally supports 1.5 class
files. Though the new information are not necessarily yet well
integrated with the VM core they should be exported to classpath.
The patch looks right to me. Go ahead !



Ito Kazumitsu wrote:
> Hi,
> I happened to find that, luckily, a class file of version 1.5
> compiled by Sun's javac from source like this:
> import java.util.ArrayList;
> public class Test1 {
>     @Deprecated
>     public static void main(String[] args) {
>         ArrayList<String> a = new ArrayList<String>();
>         a.add("aaa");
>         for (String s : a) System.out.println(s);
>     }
> }
> can be run with Kaffe normally.
> On the other hand, kaffe/kaffevm/readClass.c seems to be trying
> to prevent class file version 1.5 from running.
> But UnsupportedClassVersionError does not occur because of the
> bug in kaffe/kaffevm/readClass.c of not returning NULL.
> The question is whether UnsupportedClassVersionError should be
> thrown in this case or the class file should be run normally.
> I prefer the latter, and this is my proposed patch.

More information about the kaffe mailing list