Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 551952 - dev-java/batik-1.8 - cannot find symbol: class ImportInfo
Summary: dev-java/batik-1.8 - cannot find symbol: class ImportInfo
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL: https://github.com/apache/batik/pull/3
Whiteboard:
Keywords:
: 551964 (view as bug list)
Depends on:
Blocks: CVE-2015-0250
  Show dependency tree
 
Reported: 2015-06-13 08:56 UTC by Martin von Gagern
Modified: 2015-06-13 10:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Add missing includes (ImportInfo.diff,1.36 KB, patch)
2015-06-13 09:01 UTC, Martin von Gagern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2015-06-13 08:56:12 UTC
The batik sources are missing two import statements, causing these errors:

compile:
    [javac] Compiling 1469 source files to $S/classes
    [javac] $S/sources/org/apache/batik/script/jacl/JaclInterpreterFactory.java:70: cannot find symbol
    [javac] symbol  : class ImportInfo
    [javac] location: class org.apache.batik.script.jacl.JaclInterpreterFactory
    [javac]                                          ImportInfo imports) {
    [javac]                                          ^
    [javac] $S/sources/org/apache/batik/script/jpython/JPythonInterpreterFactory.java:70: cannot find symbol
    [javac] symbol  : class ImportInfo
    [javac] location: class org.apache.batik.script.jpython.JPythonInterpreterFactory
    [javac]                                          ImportInfo imports) {
    [javac]                                          ^
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 2 errors

The ImportInfo class exists one level up the package structure. The new implementations of these methods were added in svn commit 742654 from 2009 but if they ever worked, I don't know how. See also
https://github.com/apache/batik/commit/f91fe2c4c0207d277e39c74f052137f3a1db93e9
Comment 1 Martin von Gagern 2015-06-13 09:01:08 UTC
Created attachment 405052 [details, diff]
Add missing includes
Comment 2 Patrice Clement gentoo-dev 2015-06-13 09:55:20 UTC
Index: batik-1.8.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-java/batik/batik-1.8.ebuild,v
retrieving revision 1.1
diff -u -B -r1.1 batik-1.8.ebuild
--- batik-1.8.ebuild    7 Jun 2015 23:38:39 -0000       1.1
+++ batik-1.8.ebuild    13 Jun 2015 09:49:50 -0000
@@ -37,6 +37,18 @@
                java-ant_xml-rewrite -f ${file} -c -e javadoc -a failonerror -v no -a maxmemory -v 512m
        done
 
+       # Add some missing imports.
+       # https://bugs.gentoo.org/show_bug.cgi?id=551952
+       # https://issues.apache.org/jira/browse/BATIK-1123
+       local imports=()
+       imports+=(sources/org/apache/batik/script/jpython/JPythonInterpreterFactory.java)
+       imports+=(sources/org/apache/batik/script/jacl/JaclInterpreterFactory.java)
+       for import in ${imports[@]}; do
+               einfo "Fixing missing import in ${import}"
+               sed -i '23i import org.apache.batik.script.ImportInfo;' ${import}
+               eend $?
+       done
+
        cd lib
        rm -v *.jar build/*.jar || die
        use python && java-pkg_jar-from jython

In this case, I prefer sed over a patch for the sole purpose of adding some missing imports. ;)
Comment 3 Patrice Clement gentoo-dev 2015-06-13 09:59:11 UTC
+  13 Jun 2015; Patrice Clement <monsieurp@gentoo.org> batik-1.8.ebuild:
+  Add some missing imports to avoid a compiling issue courtesy of Martin von
+  Gagern <Martin.vGagern@gmx.net>. Fix bug 551952.
+

Thanks for the heads up.
Comment 4 Patrice Clement gentoo-dev 2015-06-13 10:26:30 UTC
*** Bug 551964 has been marked as a duplicate of this bug. ***