reta commented on code in PR #1989:
URL: https://github.com/apache/cxf/pull/1989#discussion_r1712666554
##########
core/src/main/java/org/apache/cxf/common/jaxb/JAXBUtils.java:
##########
@@ -1176,18 +1179,48 @@ private static Object createEscapeHandler(Class<?> cls,
String simpleClassName)
}
return null;
}
+
+ @SuppressWarnings({ "deprecation", "removal" })
public static JAXBContext createContext(final Set<Class<?>> classes,
final Map<String, Object> map)
throws JAXBException {
JAXBContext ctx = null;
try {
ctx = AccessController.doPrivileged(new
PrivilegedExceptionAction<JAXBContext>() {
public JAXBContext run() throws Exception {
- //This is a workaround for CXF-8675
- Class<?> factoryClass =
ClassLoaderUtils.loadClass("org.glassfish.jaxb.runtime.v2.ContextFactory",
- JAXBContextCache.class);
- Method m = factoryClass.getMethod("createContext",
Class[].class, Map.class);
- Object context = m.invoke(null, classes.toArray(new
Class<?>[0]), map);
- return (JAXBContext) context;
+ final String factoryClassName =
System.getProperty(JAXBContext.JAXB_CONTEXT_FACTORY);
Review Comment:
@rmannibucau would appreciate if you validate the approach here, I think
that would solve the underlying issue and properly instantiate the JAXB
provider of choice, thanks in advance!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]