提交 de069d06 编写于 作者: J Juergen Hoeller

Made "getJaxbContext()" method public

Issue: SPR-10282
上级 3b60f64d
...@@ -417,7 +417,10 @@ public class Jaxb2Marshaller ...@@ -417,7 +417,10 @@ public class Jaxb2Marshaller
} }
} }
protected JAXBContext getJaxbContext() { /**
* Return the JAXBContext used by this marshaller, lazily building it if necessary.
*/
public JAXBContext getJaxbContext() {
if (this.jaxbContext != null) { if (this.jaxbContext != null) {
return this.jaxbContext; return this.jaxbContext;
} }
...@@ -525,10 +528,8 @@ public class Jaxb2Marshaller ...@@ -525,10 +528,8 @@ public class Jaxb2Marshaller
public boolean supports(Class<?> clazz) { public boolean supports(Class<?> clazz) {
if (this.supportJaxbElementClass && JAXBElement.class.isAssignableFrom(clazz)) { return ((this.supportJaxbElementClass && JAXBElement.class.isAssignableFrom(clazz)) ||
return true; supportsInternal(clazz, this.checkForXmlRootElement));
}
return supportsInternal(clazz, this.checkForXmlRootElement);
} }
public boolean supports(Type genericType) { public boolean supports(Type genericType) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册