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

Core: Remove Validation#get #3189

Closed
slandelle opened this issue Nov 18, 2016 · 0 comments
Closed

Core: Remove Validation#get #3189

slandelle opened this issue Nov 18, 2016 · 0 comments

Comments

@slandelle
Copy link
Member

slandelle commented Nov 18, 2016

Error prone, unsafe and unused (at least in Gatling).

Because of implicit conversion, some people end up writing:

val session: Session = ???
session.get("foo").as[T]

It "worked" in Gatling 2 because:

  1. Session doesn't have a get method, but Validation does, so it gets lifted into Validation[Session]
  2. Validation[Session]#get returns the original Session (there and back again)
  3. ("foo") calls apply method

The proper way is and has always been session("foo").as[T]

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

No branches or pull requests

1 participant