On 11/09/14 14:39, Alan Bateman wrote:
On 11/09/2014 12:20, Miroslav Kos wrote:
Hello,
please review following change:
JBS: https://bugs.openjdk.java.net/browse/JDK-8054548
webrev: http://cr.openjdk.java.net/~mkos/8054548/jaxws.00/
It is basically replacing obsolete code using core reflection by
javax.tools API plus removing old unused code.
Thanks for doing this, it's good to get this cleaned up.
The changes looks reasonable but I wonder if they are complete. I ask
because I assumed that JavaCompilerHelper.getJarFile would be removed.
Also there appears to be a bit of skullduggery in both wsimport and
wsgen involving -Xbootclasspath/p where it might be assuming that the
JAXB or JAX-WS classes are being loaded from JAR files (I didn't did
into ParallelWorldClassLoader.toJarUrl so perhaps it can deal with
other URLs).
I agree that the code looks scary, but it's because we have to support
range of jdk (currently jdk6 to jdk9) and we want to avoid maintaining
several branches. The standalone project must work even with jdk6. The
magic here is to make the latest JAX-WS working with jdk6.
1.6 contain old JAX-B/WS API versions (2.1) and this tricky code allows
to load newer (2.2) javax.xml.* classes from jars on classpath (without
having to use java endorsed mechanism) when running standalone JAX-WS on
the top of JDK6. Hope it is not too confusing.
Anyway I found some more code to cleanup - one more class can be removed
- see version 2:
http://cr.openjdk.java.net/~mkos/8054548/jaxws.01/
In passing, I assume the comments in Invoker should use "ClassLoader"
or "class loader".
fixed.
Also the comment in createClassLoader mentions JAXB/WS 2.1 and not
clear how this relates to the method description where it talked about
2.2
In JavacompilerMessages then noJavaCompilerError() and
localizedNoJavaCompilerError() might be nicer names (in case you are
looking for something better).
Those are generated methods from resource bundle using maven plugin. I
think we own the plugin, but I would need to dive into it little bit,
not sure if it is worth it.
M.
-Alan.