[Libreoffice-commits] .: codemaker/source
Michael Stahl
mst at kemper.freedesktop.org
Mon May 21 09:54:56 PDT 2012
codemaker/source/javamaker/classfile.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 26643fb59e0005f0bc83708b785d20d62d8e7411
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri May 18 00:50:25 2012 +0200
codemaker: write version 49 (1.5) class files
The trick of writing generic types into class files of versions < 49
does no longer work with javac from OpenJDK 7:
/comphelper/qa/complex/comphelper/Map.java:154: error: type Pair does
not take parameters
Pair< ?, ? >[] initialMappings = new Pair< ?, ? >[ _keys.length ];
There appears to be a related JDK bug for this, at some time javac had
an undocumented option to produce similar class files that are also
rejected now, this has been closed as "Not a Defect":
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7078419
Change-Id: I8a504f6cbb3bb58cd914aebb88637cc6feb0bd48
diff --git a/codemaker/source/javamaker/classfile.cxx b/codemaker/source/javamaker/classfile.cxx
index 1a8bf01..8efdddb 100644
--- a/codemaker/source/javamaker/classfile.cxx
+++ b/codemaker/source/javamaker/classfile.cxx
@@ -693,7 +693,7 @@ void ClassFile::addMethod(
void ClassFile::write(FileStream & file) const {
writeU4(file, 0xCAFEBABE);
writeU2(file, 0);
- writeU2(file, 46);
+ writeU2(file, 49); // class file version of JRE 1.5
writeU2(file, m_constantPoolCount);
writeStream(file, m_constantPool);
writeU2(file, static_cast< sal_uInt16 >(m_accessFlags));
More information about the Libreoffice-commits
mailing list