Issue #2189 Fixing java 6 and 7 compatibility issue in 13.5.2 branch.

Change-Id: Ia800aee8f4e027630293b074d0b7e8d93d424611

Former-commit-id: f8e36bea6f [formerly a6a44754c9] [formerly 57a0df81a6] [formerly 9e213438f4 [formerly 57a0df81a6 [formerly 0603b0bd77a9463abaa9020bf1bcb97befd7b161]]]
Former-commit-id: 9e213438f4
Former-commit-id: e195d4590671cefaed22b31ff4f8a803d2f88877 [formerly b67a3033f9]
Former-commit-id: 0703b5c772
This commit is contained in:
Max Schenkelberg 2013-08-15 17:36:15 -05:00
parent 39cdbf728f
commit 53d4c9d9c2

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,6 +55,7 @@ import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.JAXBContextBuilder;
public class SerializationContextFactory {
@SuppressWarnings("rawtypes")
public static JAXBContext createContext(Class[] classes, Map props) {
// Construct delegate implementation
System.setProperty(JAXBContextImpl.class.getName() + ".fastBoot",
@ -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);
}