Red Hat Bugzilla – Bug 842610
libreoffice - compile with -target 1.5 or greater
Last modified: 2012-07-25 02:53:31 EDT
Package libreoffice appears to be using Java generics,
but generates class files in format older than 49.0,
which corresponds to J2SE 5.0, in which generics were introduced.
Please update this package to generate classes in format 49.0 or
above. This corresponds to -target 1.5 option of javac (or ecj).
For more information, see bug #842394
As per the jsr14-rawhide-2012-07-23.gz linked from <https://bugzilla.redhat.com/show_bug.cgi?id=842394#c0>, within libreoffice-* packages, there are class files with versions < 49.0 only in jars that are not intended to compile against (/usr/lib64/libreoffice/share/extensions/writer2latex.oxt/writer2latex-filter.jar, /usr/lib64/libreoffice/share/extensions/writer2xhtml.oxt/writer2xhtml-filter.jar, and /usr/lib64/libreoffice/program/classes/saxon9.jar). Furthermore, upstream <http://cgit.freedesktop.org/libreoffice/core/commit/?id=26643fb59e0005f0bc83708b785d20d62d8e7411> "codemaker: write version 49 (1.5) class files," included in LibreOffice 3.6.0, already fixed this issue for LibreOffice jars that are intended to compile against (to address the same OpenJDK 7 issue discussed in bug 842394).
(In reply to comment #1)
These are not even part of libreoffice: they belong to writer2latex extension that is maintained separately (and not by the libreoffice team).
(In reply to comment #2)
> (In reply to comment #1)
> > (/usr/lib64/libreoffice/share/extensions/writer2latex.oxt/writer2latex-
> > filter.jar,
> > /usr/lib64/libreoffice/share/extensions/writer2xhtml.oxt/writer2xhtml-filter.
> > jar
> These are not even part of libreoffice: they belong to writer2latex
> extension that is maintained separately (and not by the libreoffice team).
writer2latex jars are fine. The suspicious jar file was
which belongs to libreoffice-core-1:184.108.40.206-1.fc18.x86_64,
which was built from libreoffice-220.127.116.11-1.fc18.src.rpm.
All classes in this jar have version 48.0.
(In reply to comment #3)
> writer2latex jars are fine. The suspicious jar file was
> which belongs to libreoffice-core-1:18.104.22.168-1.fc18.x86_64,
> which was built from libreoffice-22.214.171.124-1.fc18.src.rpm.
> All classes in this jar have version 48.0.
But that saxon9.jar is safe too. (It is an external jar that is bundled with LibreOffice, likely because a system-wide one, if any, does not meet certain requirements---this is an exception to the rule that has most likely been discussed elsewhere already. It is not beeing built during the LibreOffice build.) It is only included in LibreOffice so that other parts of LibreOffice can access its services indirectly via javax.xml.transform.TransformerFactory. The only place where LibreOffice code actually uses any saxon9.jar code during compilation is a use of net.sf.saxon.FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS in filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTransformer.java, which should be safe (as further evidenced by the fact that LibreOffice does build fine with OpenJDK 7 already, see comment 1).