[SPR-15718] Update getAttribute on ServerWebExchange and WebSession to align with Map getOrDefault Created: 29/Jun/17  Updated: 15/Jan/19  Resolved: 29/Jun/17

Status: Closed
Project: Spring Framework
Component/s: Reactive, Web
Affects Version/s: 5.0 RC2
Fix Version/s: 5.0 RC3

Type: Improvement Priority: Minor
Reporter: Rossen Stoyanchev Assignee: Rossen Stoyanchev
Resolution: Complete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Days since last comment: 1 year, 6 weeks, 1 day ago
Last commented by a User: true
Last updater: Spring Issuemaster

Comment by Rob Winch [ 29/Jun/17 ]

I'd like to request that there is also easy to get a value with no default value and no casting. Something like: <T> T getAttribute(String attrName).

Comment by Rossen Stoyanchev [ 29/Jun/17 ]

Indeed that is the plan. All of the following actually:

<T> T getAttribute(String name);

<T> T getRequiredAttribute(String name);

<T> T getAttributeOrDefault(String name, T defaultValue);
Comment by Rob Winch [ 29/Jun/17 ]

Awesome! Thanks

Comment by Spring Issuemaster [ 14/Jan/19 ]

The Spring Framework has migrated to GitHub Issues. This issue corresponds to spring-projects/spring-framework#20274.

Generated at Tue Feb 25 22:59:08 UTC 2020 using Jira 7.13.8#713008-sha1:1606a5c1e7006e1ab135aac81f7a9566b2dbc3a6.