Skip to content

Commit 9ec50a2

Browse files
committed
Javadoc fixes
(cherry picked from commit 392f9c8)
1 parent d3c0e75 commit 9ec50a2

File tree

3 files changed

+24
-20
lines changed

3 files changed

+24
-20
lines changed

spring-jdbc/src/main/java/org/springframework/jdbc/datasource/ConnectionHandle.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2005 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,12 +20,13 @@
2020

2121
/**
2222
* Simple interface to be implemented by handles for a JDBC Connection.
23-
* Used by JdoDialect, for example.
23+
* Used by JpaDialect and JdoDialect, for example.
2424
*
2525
* @author Juergen Hoeller
2626
* @since 1.1
2727
* @see SimpleConnectionHandle
2828
* @see ConnectionHolder
29+
* @see org.springframework.orm.jpa.JpaDialect#getJdbcConnection
2930
* @see org.springframework.orm.jdo.JdoDialect#getJdbcConnection
3031
*/
3132
public interface ConnectionHandle {

spring-web/src/main/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessor.java

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -37,30 +37,32 @@
3737
import org.springframework.web.method.support.ModelAndViewContainer;
3838

3939
/**
40-
* Resolves method arguments annotated with {@code @ModelAttribute} and handles
41-
* return values from methods annotated with {@code @ModelAttribute}.
40+
* Resolve {@code @ModelAttribute} annotated method arguments and handle
41+
* return values from {@code @ModelAttribute} annotated methods.
4242
*
43-
* <p>Model attributes are obtained from the model or if not found possibly
44-
* created with a default constructor if it is available. Once created, the
45-
* attributed is populated with request data via data binding and also
46-
* validation may be applied if the argument is annotated with
47-
* {@code @javax.validation.Valid}.
43+
* <p>Model attributes are obtained from the model or created with a default
44+
* constructor (and then added to the model). Once created the attribute is
45+
* populated via data binding to Servlet request parameters. Validation may be
46+
* applied if the argument is annotated with {@code @javax.validation.Valid}.
47+
* or Spring's own {@code @org.springframework.validation.annotation.Validated}.
4848
*
49-
* <p>When this handler is created with {@code annotationNotRequired=true},
49+
* <p>When this handler is created with {@code annotationNotRequired=true}
5050
* any non-simple type argument and return value is regarded as a model
5151
* attribute with or without the presence of an {@code @ModelAttribute}.
5252
*
5353
* @author Rossen Stoyanchev
5454
* @since 3.1
5555
*/
56-
public class ModelAttributeMethodProcessor implements HandlerMethodArgumentResolver, HandlerMethodReturnValueHandler {
56+
public class ModelAttributeMethodProcessor
57+
implements HandlerMethodArgumentResolver, HandlerMethodReturnValueHandler {
5758

5859
protected final Log logger = LogFactory.getLog(getClass());
5960

6061
private final boolean annotationNotRequired;
6162

6263

6364
/**
65+
* Class constructor.
6466
* @param annotationNotRequired if "true", non-simple method arguments and
6567
* return values are considered model attributes with or without a
6668
* {@code @ModelAttribute} annotation.
@@ -71,8 +73,9 @@ public ModelAttributeMethodProcessor(boolean annotationNotRequired) {
7173

7274

7375
/**
74-
* Returns {@code true} if the parameter is annotated with {@link ModelAttribute}
75-
* or in default resolution mode, and also if it is not a simple type.
76+
* Returns {@code true} if the parameter is annotated with
77+
* {@link ModelAttribute} or, if in default resolution mode, for any
78+
* method parameter that is not a simple type.
7679
*/
7780
@Override
7881
public boolean supportsParameter(MethodParameter parameter) {
@@ -100,8 +103,8 @@ public final Object resolveArgument(MethodParameter parameter, ModelAndViewConta
100103
NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception {
101104

102105
String name = ModelFactory.getNameForParameter(parameter);
103-
Object attribute = (mavContainer.containsAttribute(name) ?
104-
mavContainer.getModel().get(name) : createAttribute(name, parameter, binderFactory, webRequest));
106+
Object attribute = (mavContainer.containsAttribute(name) ? mavContainer.getModel().get(name) :
107+
createAttribute(name, parameter, binderFactory, webRequest));
105108

106109
WebDataBinder binder = binderFactory.createBinder(webRequest, attribute, name);
107110
if (binder.getTarget() != null) {
@@ -178,7 +181,8 @@ protected boolean isBindExceptionRequired(WebDataBinder binder, MethodParameter
178181

179182
/**
180183
* Return {@code true} if there is a method-level {@code @ModelAttribute}
181-
* or if it is a non-simple type when {@code annotationNotRequired=true}.
184+
* or, in default resolution mode, for any return value type that is not
185+
* a simple type.
182186
*/
183187
public boolean supportsReturnType(MethodParameter returnType) {
184188
if (returnType.getMethodAnnotation(ModelAttribute.class) != null) {

spring-web/src/main/java/org/springframework/web/util/HtmlUtils.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,15 +25,14 @@
2525
* <a href="http://www.w3.org/TR/html4/charset.html">http://www.w3.org/TR/html4/charset.html</a>
2626
*
2727
* <p>For a comprehensive set of String escaping utilities,
28-
* consider Jakarta Commons Lang and its StringEscapeUtils class.
28+
* consider Apache Commons Lang and its StringEscapeUtils class.
2929
* We are not using that class here to avoid a runtime dependency
3030
* on Commons Lang just for HTML escaping. Furthermore, Spring's
3131
* HTML escaping is more flexible and 100% HTML 4.0 compliant.
3232
*
3333
* @author Juergen Hoeller
3434
* @author Martin Kersten
3535
* @since 01.03.2003
36-
* @see org.apache.commons.lang.StringEscapeUtils
3736
*/
3837
public abstract class HtmlUtils {
3938

0 commit comments

Comments
 (0)