You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
f0bb8b5 (and several later commits) introduced uses of the newFactory methods of javax.xml.stream.XML{Input,Output}Factory. These methods are present in all Java versions we intend to support, back to Java 6. They aredocumented in the
Java 6 API docs, and can be confirmed with javap in the rt.jar of an IcedTea-6 installation.
There was never a problem until c3b47c9 altered the POM to use javac's --release 6 option when compiling with a 9 to 11 javac, rather than the -source/-target options formerly used. The --release option goes further than checking source compatibility, and checks that all API used was present in the targeted release. To do that, it relies on .sig files (which are really .class files stripped down to only API signatures) that ship in the ct.sym file (which is really a jar) in the JDK's lib directory.
Extracting the 6/javax/xml/stream/XML{In,Out}putFactory.sig files from ct.sym and examining them with javap shows that they are missing the newFactory methods, leading javac to report incorrectly that the methods weren't available in 6.
Building with Java 12 isn't a problem, because it no longer supports Java 6, and the POM already adjusts the --release option in that case to 7, and the methods are not missing from the shipped signatures for 7.
The best fix is probably to change all of the uses to the equivalent newInstance() methods, which are properly found in the .sig files. (There was one newFactory method on XMLOutputFactory that had to be deprecated because of a typo, and a corresponding one in XMLInputFactory that was also deprecated for consistency, but neither of those appears in PL/Java.)
Making a new issue, first reported in a comment on #212.
As reported in issue #235, the --release option in newer javac
versions will check against a ct.sym file included in the jdk
that is meant to record what API was available in which prior
releases, and that file (at least as shipped in Java 11) is
missing the newFactory() methods on XMLInputFactory and
XMLOutputFactory for release 6, so it reports them not found.
Happily, both no-arg newFactory() methods are equivalent to
the no-arg newInstance() methods. Deprecation tags were added
to the newInstance(String,ClassLoader) methods, but not to
the no-arg ones.
f0bb8b5 (and several later commits) introduced uses of the
newFactory
methods ofjavax.xml.stream.XML{Input,Output}Factory
. These methods are present in all Java versions we intend to support, back to Java 6. They are documented in theJava 6 API docs, and can be confirmed with
javap
in thert.jar
of an IcedTea-6 installation.There was never a problem until c3b47c9 altered the POM to use
javac
's--release 6
option when compiling with a 9 to 11javac
, rather than the-source
/-target
options formerly used. The--release
option goes further than checking source compatibility, and checks that all API used was present in the targeted release. To do that, it relies on.sig
files (which are really.class
files stripped down to only API signatures) that ship in thect.sym
file (which is really a jar) in the JDK'slib
directory.Extracting the
6/javax/xml/stream/XML{In,Out}putFactory.sig
files fromct.sym
and examining them withjavap
shows that they are missing thenewFactory
methods, leadingjavac
to report incorrectly that the methods weren't available in 6.Building with Java 12 isn't a problem, because it no longer supports Java 6, and the POM already adjusts the
--release
option in that case to 7, and the methods are not missing from the shipped signatures for 7.The best fix is probably to change all of the uses to the equivalent
newInstance()
methods, which are properly found in the.sig
files. (There was onenewFactory
method onXMLOutputFactory
that had to be deprecated because of a typo, and a corresponding one inXMLInputFactory
that was also deprecated for consistency, but neither of those appears in PL/Java.)Making a new issue, first reported in a comment on #212.
See also: JEP247
The text was updated successfully, but these errors were encountered: