Skip to content

Conversation

@akoncius
Copy link
Collaborator

Closes #98

@stangls
Copy link
Contributor

stangls commented Nov 18, 2016

This approach solves the issue of storing multiple values as session-data.
But I currently can not see in which way this closes #98.
The idea of #98 was to have type-safe access to session-data from the users perspective. For example, when storing an Int in the first request, I would like the framework to actually give me back an Int in the next request (instead of Any?).
In #98 I provided an example with the generic type T being returned when calling get on a SessionFetcher.

@akoncius
Copy link
Collaborator Author

ohhh, right. my bad. Will take a look


private var data: HashMap<String, Any?> = hashMapOf()

fun get(name: String) : Any? {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to override the get and set operators here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants