reta commented on a change in pull request #525: try to skip jaxb when not 
available in jaxrs
URL: https://github.com/apache/cxf/pull/525#discussion_r266709508
 
 

 ##########
 File path: 
rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
 ##########
 @@ -125,6 +130,19 @@
 
         VALUE_CONTEXTS.add(Application.class.getName());
         VALUE_CONTEXTS.add("javax.ws.rs.sse.Sse");
+
+        boolean useJaxb;
+        try {
+            ClassLoader loader = 
Thread.currentThread().getContextClassLoader();
+            if (loader == null) {
+                loader = getSystemClassLoader();
+            }
+            
loader.loadClass("javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter");
 
 Review comment:
   You may better use 
`ClassLoaderUtils.loadClass("javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter",
 InjectionUtils.class)` since it properly handles the presence of the 
`SecurityManager`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to