YARN-9743. [JDK11] TestTimelineWebServices.testContextFactory fails. (#1824) Contributed by Akira Ajisaka and Kinga Marton.
This commit is contained in:
parent
799d4c1cf4
commit
a5ef08b619
@ -83,7 +83,7 @@ private ContextFactory() {
|
||||
public static JAXBContext newContext(Class[] classes,
|
||||
Map<String, Object> properties) throws Exception {
|
||||
Class spFactory = Class.forName(
|
||||
"com.sun.xml.internal.bind.v2.ContextFactory");
|
||||
"com.sun.xml.bind.v2.ContextFactory");
|
||||
Method m = spFactory.getMethod("createContext", Class[].class, Map.class);
|
||||
return (JAXBContext) m.invoke((Object) null, classes, properties);
|
||||
}
|
||||
@ -123,7 +123,7 @@ public static JAXBContext createContext(Class[] classes,
|
||||
public static JAXBContext createContext(String contextPath, ClassLoader
|
||||
classLoader, Map<String, Object> properties) throws Exception {
|
||||
Class spFactory = Class.forName(
|
||||
"com.sun.xml.internal.bind.v2.ContextFactory");
|
||||
"com.sun.xml.bind.v2.ContextFactory");
|
||||
Method m = spFactory.getMethod("createContext", String.class,
|
||||
ClassLoader.class, Map.class);
|
||||
return (JAXBContext) m.invoke(null, contextPath, classLoader,
|
||||
|
Loading…
Reference in New Issue
Block a user