summaryrefslogtreecommitdiff
path: root/codemaker
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-05-18 00:50:25 +0200
committerMichael Stahl <mstahl@redhat.com>2012-05-21 18:48:04 +0200
commit26643fb59e0005f0bc83708b785d20d62d8e7411 (patch)
tree623a4bebb5538099babe885b3810a61eb3620f12 /codemaker
parente81f02795425f2fcd910c9845adc8e9b919833f4 (diff)
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
Diffstat (limited to 'codemaker')
-rw-r--r--codemaker/source/javamaker/classfile.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/codemaker/source/javamaker/classfile.cxx b/codemaker/source/javamaker/classfile.cxx
index 1a8bf01d481b..8efdddb80b4f 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));