Skip to content

Slight Improvement for Main JavaDoc in RedirectView [SPR-5910] #10579

Closed
@spring-projects-issues

Description

@spring-projects-issues

Nathan Hook opened SPR-5910 and commented

http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/web/servlet/view/RedirectView.html

Currently (as of Spring Framework API 2.5) a reader of the RedirectView JavaDoc is lead to believe that "... by default exposing all model attributes as HTTP query parameters."

I read that to mean that all values in the passed model regardless of its object type are added as query parameters. HOWEVER, is is not the case. A user of the RedirectView has to also read the JavaDoc for the protected method, isEligibleProperty(String key, Object value), which states:

"...
The default implementation considers Strings and primitives as eligible, and also arrays and Collections/Iterables with corresponding elements.
..."

to figure out that no, not all attributes are added, only Strings and primitives are added as query parameters. It might be inappropriate to force a reader to read a protected method's JavaDoc to figure out important behavior of a class.

It would be nice if the main JavaDoc of the class clearly states that NOT ALL model attributes are added as query parameters, but only model attributes that are: Strings, primitive, and primitive wrappers.

Thank you for your time.


Affects: 2.5.5

Referenced from: commits 501a1ea

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions