paypal/squbs

Improper class casting can happen in RequestContext

crankydillo opened this issue · 3 comments

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.

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.

Just click on "Unwatch" button at the top.