mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Refine various javadoc notes
This commit is contained in:
@@ -49,7 +49,7 @@ import java.beans.PropertyDescriptor;
|
||||
public interface BeanWrapper extends ConfigurablePropertyAccessor {
|
||||
|
||||
/**
|
||||
* Specify a limit for array and collection auto-growing.
|
||||
* Specify a limit for array and collection/set/list auto-growing.
|
||||
* <p>Default is unlimited on a plain BeanWrapper.
|
||||
* @since 4.1
|
||||
*/
|
||||
|
||||
@@ -270,12 +270,12 @@ public class DataBinder implements PropertyEditorRegistry, TypeConverter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify the limit for array and collection auto-growing.
|
||||
* Specify the limit for array and collection/set/list auto-growing.
|
||||
* <p>Default is 256, preventing OutOfMemoryErrors in case of large indexes.
|
||||
* Raise this limit if your auto-growing needs are unusually high.
|
||||
* <p>Used for setter injection via {@link #bind(PropertyValues)};
|
||||
* not applicable to field injection, and not to constructor binding
|
||||
* via {@link #construct} either.
|
||||
* not applicable to map properties and not to field injection and
|
||||
* constructor binding via {@link #construct} either.
|
||||
* @see #initBeanPropertyAccess()
|
||||
* @see org.springframework.beans.BeanWrapper#setAutoGrowCollectionLimit
|
||||
*/
|
||||
@@ -326,6 +326,8 @@ public class DataBinder implements PropertyEditorRegistry, TypeConverter {
|
||||
/**
|
||||
* Initialize direct field access for this DataBinder,
|
||||
* as alternative to the default bean property access.
|
||||
* <p><b>NOTE: This is an advanced option for trusted scenarios.</b>
|
||||
* Do not use direct field access for data binding from untrusted sources.
|
||||
* @see #initBeanPropertyAccess()
|
||||
* @see #createDirectFieldBindingResult()
|
||||
*/
|
||||
|
||||
+3
-3
@@ -100,20 +100,20 @@ public class LocalizedResourceHelper {
|
||||
String variant = locale.getVariant();
|
||||
|
||||
// Check for file with language, country and variant localization.
|
||||
if (variant.length() > 0) {
|
||||
if (!variant.isEmpty()) {
|
||||
String location =
|
||||
name + this.separator + lang + this.separator + country + this.separator + variant + extension;
|
||||
resource = this.resourceLoader.getResource(location);
|
||||
}
|
||||
|
||||
// Check for file with language and country localization.
|
||||
if ((resource == null || !resource.exists()) && country.length() > 0) {
|
||||
if ((resource == null || !resource.exists()) && !country.isEmpty()) {
|
||||
String location = name + this.separator + lang + this.separator + country + extension;
|
||||
resource = this.resourceLoader.getResource(location);
|
||||
}
|
||||
|
||||
// Check for document with language localization.
|
||||
if ((resource == null || !resource.exists()) && lang.length() > 0) {
|
||||
if ((resource == null || !resource.exists()) && !lang.isEmpty()) {
|
||||
String location = name + this.separator + lang + extension;
|
||||
resource = this.resourceLoader.getResource(location);
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ public abstract class FileSystemUtils {
|
||||
|
||||
/**
|
||||
* Recursively copy the contents of the {@code src} file/directory
|
||||
* to the {@code dest} file/directory.
|
||||
* to the {@code dest} file/directory, including symbolic links.
|
||||
* @param src the source directory
|
||||
* @param dest the destination directory
|
||||
* @throws IOException in the case of I/O errors
|
||||
|
||||
+3
@@ -30,6 +30,9 @@ import org.springframework.util.Assert;
|
||||
* if the destination resolving process is expensive (for example, the destination has to be
|
||||
* resolved through an external system) and the resolution results are stable anyway.
|
||||
*
|
||||
* <p>Note: This cache is not designed for setups with varying dynamic destination names.
|
||||
* Prefer direct destination resolution in such scenarios.
|
||||
*
|
||||
* @author Agim Emruli
|
||||
* @author Juergen Hoeller
|
||||
* @since 4.1
|
||||
|
||||
+2
@@ -83,6 +83,8 @@ public class ConfigurableWebBindingInitializer implements WebBindingInitializer
|
||||
* Set whether to use direct field access instead of bean property access.
|
||||
* <p>Default is {@code false}, using bean property access.
|
||||
* Switch this to {@code true} in order to enforce direct field access.
|
||||
* <p><b>NOTE: This is an advanced option for trusted scenarios.</b>
|
||||
* Do not use direct field access for data binding from untrusted sources.
|
||||
* @see org.springframework.validation.DataBinder#initDirectFieldAccess()
|
||||
* @see org.springframework.validation.DataBinder#initBeanPropertyAccess()
|
||||
*/
|
||||
|
||||
+4
-3
@@ -51,6 +51,7 @@ public class ParameterizableViewController extends AbstractController {
|
||||
setSupportedMethods(HttpMethod.GET.name(), HttpMethod.HEAD.name());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set a view name for the ModelAndView to return, to be resolved by the
|
||||
* DispatcherServlet via a ViewResolver. Will override any pre-existing
|
||||
@@ -117,12 +118,11 @@ public class ParameterizableViewController extends AbstractController {
|
||||
return this.statusCode;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The property can be used to indicate the request is considered fully
|
||||
* handled within the controller and that no view should be used for rendering.
|
||||
* Useful in combination with {@link #setStatusCode}.
|
||||
* <p>By default this is set to {@code false}.
|
||||
* <p>By default, this is set to {@code false}.
|
||||
* @since 4.1
|
||||
*/
|
||||
public void setStatusOnly(boolean statusOnly) {
|
||||
@@ -187,10 +187,11 @@ public class ParameterizableViewController extends AbstractController {
|
||||
sb.append("status=").append(this.statusCode);
|
||||
}
|
||||
if (this.view != null) {
|
||||
sb.append(sb.length() != 0 ? ", " : "");
|
||||
sb.append(!sb.isEmpty() ? ", " : "");
|
||||
String viewName = getViewName();
|
||||
sb.append("view=").append(viewName != null ? "\"" + viewName + "\"" : this.view);
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user