Polishing

This commit is contained in:
Juergen Hoeller
2019-04-26 21:17:17 +02:00
parent 4bfa2ccec5
commit 4c49833079
11 changed files with 61 additions and 66 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -54,9 +54,8 @@ import org.springframework.util.ClassUtils;
* {@link XmlType}, and write classes annotated with {@link XmlRootElement},
* or subclasses thereof.
*
* <p>Note that if using Spring's Marshaller/Unmarshaller abstractions from the
* {@code spring-oxm} module you should can the
* {@link MarshallingHttpMessageConverter} instead.
* <p>Note: When using Spring's Marshaller/Unmarshaller abstractions from {@code spring-oxm},
* you should use the {@link MarshallingHttpMessageConverter} instead.
*
* @author Arjen Poutsma
* @author Sebastien Deleuze
@@ -72,7 +71,7 @@ public class Jaxb2RootElementHttpMessageConverter extends AbstractJaxb2HttpMessa
/**
* Indicates whether DTD parsing should be supported.
* Indicate whether DTD parsing should be supported.
* <p>Default is {@code false} meaning that DTD is disabled.
*/
public void setSupportDtd(boolean supportDtd) {
@@ -80,14 +79,14 @@ public class Jaxb2RootElementHttpMessageConverter extends AbstractJaxb2HttpMessa
}
/**
* Whether DTD parsing is supported.
* Return whether DTD parsing is supported.
*/
public boolean isSupportDtd() {
return this.supportDtd;
}
/**
* Indicates whether external XML entities are processed when converting to a Source.
* Indicate whether external XML entities are processed when converting to a Source.
* <p>Default is {@code false}, meaning that external entities are not resolved.
* <p><strong>Note:</strong> setting this option to {@code true} also
* automatically sets {@link #setSupportDtd} to {@code true}.
@@ -100,7 +99,7 @@ public class Jaxb2RootElementHttpMessageConverter extends AbstractJaxb2HttpMessa
}
/**
* Returns the configured value for whether XML external entities are allowed.
* Return whether XML external entities are allowed.
*/
public boolean isProcessExternalEntities() {
return this.processExternalEntities;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -94,7 +94,7 @@ public class SourceHttpMessageConverter<T extends Source> extends AbstractHttpMe
/**
* Indicates whether DTD parsing should be supported.
* Indicate whether DTD parsing should be supported.
* <p>Default is {@code false} meaning that DTD is disabled.
*/
public void setSupportDtd(boolean supportDtd) {
@@ -102,14 +102,14 @@ public class SourceHttpMessageConverter<T extends Source> extends AbstractHttpMe
}
/**
* Whether DTD parsing is supported.
* Return whether DTD parsing is supported.
*/
public boolean isSupportDtd() {
return this.supportDtd;
}
/**
* Indicates whether external XML entities are processed when converting to a Source.
* Indicate whether external XML entities are processed when converting to a Source.
* <p>Default is {@code false}, meaning that external entities are not resolved.
* <p><strong>Note:</strong> setting this option to {@code true} also
* automatically sets {@link #setSupportDtd} to {@code true}.
@@ -122,7 +122,7 @@ public class SourceHttpMessageConverter<T extends Source> extends AbstractHttpMe
}
/**
* Returns the configured value for whether XML external entities are allowed.
* Return whether XML external entities are allowed.
*/
public boolean isProcessExternalEntities() {
return this.processExternalEntities;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,7 +27,8 @@ import org.springframework.core.MethodParameter;
* For example custom (async) handlers, by default ordered after built-in
* handlers, should take precedence over {@code @ResponseBody} or
* {@code @ModelAttribute} handling, which should occur once the async value is
* ready.
* ready. By contrast, built-in (async) handlers are already ordered ahead of
* sync handlers.
*
* @author Rossen Stoyanchev
* @since 4.2
@@ -36,9 +37,9 @@ public interface AsyncHandlerMethodReturnValueHandler extends HandlerMethodRetur
/**
* Whether the given return value represents asynchronous computation.
* @param returnValue the return value
* @param returnValue the value returned from the handler method
* @param returnType the return type
* @return {@code true} if the return value is asynchronous.
* @return {@code true} if the return value type represents an async value
*/
boolean isAsyncReturnValue(Object returnValue, MethodParameter returnType);