Issue #2126 - updated for Java 7 compatibility; compatible with both Java 6 and Java 7

Former-commit-id: 5b85217ca2 [formerly 5b85217ca2 [formerly 9b6169bf7d86c9fa842f15aa6a8ba0777804be26]]
Former-commit-id: cd2af684ca
Former-commit-id: 7ebee00dc9
This commit is contained in:
Bryan Kowal 2013-06-24 14:08:47 -05:00
parent 3b22e752aa
commit 6cff1f63bb

View file

@ -45,6 +45,7 @@ import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.JAXBContextBuilder;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 12, 2011 mschenke Initial creation
* June 24, 2013 #2126 bkowal Update for Java 7 compatibility
*
* </pre>
*
@ -54,7 +55,8 @@ import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.JAXBContextBuilder;
public class SerializationContextFactory {
public static JAXBContext createContext(Class[] classes, Map props) {
@SuppressWarnings("rawtypes")
public static JAXBContext createContext(Class[] classes, Map props) {
// Construct delegate implementation
System.setProperty(JAXBContextImpl.class.getName() + ".fastBoot",
"true");
@ -68,7 +70,7 @@ public class SerializationContextFactory {
// TODO: Can we override/extend some part of the context
// implementation to allow for ignoring of xsi:type fields that we
// don't have classes for?
return new CustomJAXBContext(new JAXBContextImpl(builder));
return new CustomJAXBContext(builder.build());
} catch (JAXBException e) {
throw new RuntimeException(e);
}