Hi,

This patch fixes deprecation warnings in the jaxp repo. I'm limiting the changes to deprecation or the 102 classes. The cup-generated classes, XPath*.java, could use some cleanup or even rewrite, but that will be left in future works (JDK-8183580).

Most of the changes are straight-forward, but I did have trouble with the replacing clazz.newInstance() with clazz.getDeclaredConstructor().newInstance() since in some cases I got RuntimePermission problems. So for most of such cases, I've replaced them with getConstructor() instead, thanks Alan for the suggestion. For specific cases such as xsltc/compiler/Parser.java, I'm using getDeclaredConstructor() because some of the classes didn't have a public constructor.

Again, please bear with me for the cup-generated classes that have super long lines (e.g. XPathParser.java). Please read with Udiffs instead of Sdiffs.

Some of the boxing (e.g. Integer.valueOf()) in the BCEL classes may not be necessary, but that's how they look in BCEL to which an update is scheduled in JDK 10.

All tests passed.

JBS: https://bugs.openjdk.java.net/browse/JDK-8181154
webrevs: http://cr.openjdk.java.net/~joehw/jdk10/8181154/webrev/

Thanks
Joe

Reply via email to