Apache OpenOffice (AOO) Bugzilla – Issue 121098
JDK7 : Replace generic type 46 with 49.
Last modified: 2013-07-11 15:05:24 UTC
Created attachment 79635 [details] Replace the generic type in codemaker/javamaker In the Java 5/6 compilers it is possible to compile with an undocumented -jsr14 option, However, on JDK 7 the compiler no longer recognizes the generic attributes in these class files. Full explanation is here: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7078419 We follow the workaround: "Recompiling the classes but this is unfortunately not always possible. I expect that it is possible to set the class file version to 49 but have not tested this." The issue was detected first by Michael Stahl and Stephan Bergmann and the solution was based on a commit log posted in a public list.
Comment on attachment 79635 [details] Replace the generic type in codemaker/javamaker In file main/codemaker/source/javamaker/classfile.cxx We use type 46 in function ClassFile::write(FileStream & file). An alternative would be to use type 49 there which stands for Java5.
"hdu" committed SVN revision 1449622 into trunk: #i121098# use a classfile format compatible with at least JDK 5/6/7
Fixed with the commit above. Please review.
Hmm ... The extra casting is good but I miss the reason for the decimal point in the #define and the complicated way of calculating 0 to multiply it. It does fix the issue though :).
The naming of the major/minor version of classfile format comes straight from the JVM specification and the calculation of the two fields follows from it too.
I see .. OK, thanks!