Nullability refinements on private and static methods

Based on IntelliJ IDEA 2017.3 introspection results.

Issue: SPR-15756
This commit is contained in:
Juergen Hoeller
2017-09-22 18:22:12 +02:00
parent 60f47f4489
commit 7ae59d0c2a
88 changed files with 319 additions and 300 deletions

View File

@@ -490,7 +490,7 @@ public class Jaxb2Marshaller implements MimeMarshaller, MimeUnmarshaller, Generi
if (context == null) {
try {
if (StringUtils.hasLength(this.contextPath)) {
context = createJaxbContextFromContextPath();
context = createJaxbContextFromContextPath(this.contextPath);
}
else if (!ObjectUtils.isEmpty(this.classesToBeBound)) {
context = createJaxbContextFromClasses(this.classesToBeBound);
@@ -511,26 +511,26 @@ public class Jaxb2Marshaller implements MimeMarshaller, MimeUnmarshaller, Generi
}
}
private JAXBContext createJaxbContextFromContextPath() throws JAXBException {
private JAXBContext createJaxbContextFromContextPath(String contextPath) throws JAXBException {
if (logger.isInfoEnabled()) {
logger.info("Creating JAXBContext with context path [" + this.contextPath + "]");
}
if (this.jaxbContextProperties != null) {
if (this.beanClassLoader != null) {
return JAXBContext.newInstance(this.contextPath, this.beanClassLoader, this.jaxbContextProperties);
return JAXBContext.newInstance(contextPath, this.beanClassLoader, this.jaxbContextProperties);
}
else {
// analogous to the JAXBContext.newInstance(String) implementation
return JAXBContext.newInstance(this.contextPath, Thread.currentThread().getContextClassLoader(),
return JAXBContext.newInstance(contextPath, Thread.currentThread().getContextClassLoader(),
this.jaxbContextProperties);
}
}
else {
if (this.beanClassLoader != null) {
return JAXBContext.newInstance(this.contextPath, this.beanClassLoader);
return JAXBContext.newInstance(contextPath, this.beanClassLoader);
}
else {
return JAXBContext.newInstance(this.contextPath);
return JAXBContext.newInstance(contextPath);
}
}
}