Issue #2126 - updated for Java 7 compatibility; compatible with both Java 6 and Java 7
Former-commit-id:5b85217ca2
[formerly5b85217ca2
[formerly 9b6169bf7d86c9fa842f15aa6a8ba0777804be26]] Former-commit-id:cd2af684ca
Former-commit-id:7ebee00dc9
This commit is contained in:
parent
3b22e752aa
commit
6cff1f63bb
1 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue