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

Improper class casting can happen in RequestContext #654

Open
crankydillo opened this issue May 10, 2018 · 3 comments
Open

Improper class casting can happen in RequestContext #654

crankydillo opened this issue May 10, 2018 · 3 comments

Comments

@crankydillo
Copy link
Contributor

copy(response = Option(response.map(_.asInstanceOf[sm.HttpResponse])))

This cast can fail. It is worrisome because a client would normally expect the Failure to be some kind of HTTP thing.

AFAIK, AKKA only has the Scala implementation for the Java-based abstract HttpResponse, but we should still address this if the cost isn't too high.

@anilgursel
Copy link
Collaborator

Not worried about the casting to be failed (as there is one implementation), but I agree it looks unnecessary (at least without looking into details). We should instead keep the API with jm.HttpResponse.

@jfiske01
Copy link

jfiske01 commented May 14, 2018 via email

@anilgursel
Copy link
Collaborator

Just click on "Unwatch" button at the top.

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

No branches or pull requests

3 participants