Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
spring-projects-issues opened this issue Jul 8, 2009 · 0 comments
Closed
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants