[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: 35 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 Sep 17 23:18:42 UTC 2019 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.