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

Add type ascription in play.api.test.Fakes.scala, and remove useless method #7007

Merged
merged 1 commit into from Feb 28, 2017

Conversation

Projects
None yet
2 participants
@3tty0n
Contributor

3tty0n commented Feb 23, 2017

Pull Request Checklist

  • Have you read How to write the perfect pull request?
  • Have you read through the contributor guidelines?
  • Have you signed the Lightbend CLA?
  • Have you [squashed your commits]? (Optional, but makes merge messages nicer.)
  • Have you added copyright headers to new files?
  • Have you checked that both Scala and Java APIs are updated?
  • Have you updated the documentation for both Scala and Java sections?
  • Have you added tests for any changed functionality?

Purpose

This adds type ascription to path and withMultipartFormDateBody method in play.api.test.FakeRequest and play.api.test.RequestTarget.
And remove useless method.

Show outdated Hide outdated framework/src/play-test/src/main/scala/play/api/test/Fakes.scala
@@ -112,7 +112,7 @@ class FakeRequest[A](request: Request[A]) extends Request[A] {
withBody(body = AnyContentAsFormUrlEncoded(play.utils.OrderPreserving.groupBy(data.toSeq)(_._1)))
}
def certs = Future.successful(IndexedSeq.empty)
def certs: Future[IndexedSeq[Nothing]] = Future.successful(IndexedSeq.empty)

This comment has been minimized.

@gmethvin

gmethvin Feb 23, 2017

Member

I actually have no idea where this method is used. I would assume it's meant to be a Future[Seq[X509Certificate]] but if it's not needed anywhere maybe we should just remove it.

/cc @playframework/core

@gmethvin

gmethvin Feb 23, 2017

Member

I actually have no idea where this method is used. I would assume it's meant to be a Future[Seq[X509Certificate]] but if it's not needed anywhere maybe we should just remove it.

/cc @playframework/core

This comment has been minimized.

@3tty0n

3tty0n Feb 27, 2017

Contributor

@gmethvin Thank you for replying. Temporally should I fix the type ascription of certs Future[IndexSeq[Nothing]] to Future[Seq[X509Certificate]] ?

@3tty0n

3tty0n Feb 27, 2017

Contributor

@gmethvin Thank you for replying. Temporally should I fix the type ascription of certs Future[IndexSeq[Nothing]] to Future[Seq[X509Certificate]] ?

This comment has been minimized.

@gmethvin

gmethvin Feb 27, 2017

Member

@3tty0n After some investigation it seems the method was added accidentally in an unrelated commit. It was never documented.

Since the method is essentially useless, I suggest we remove it completely.

@gmethvin

gmethvin Feb 27, 2017

Member

@3tty0n After some investigation it seems the method was added accidentally in an unrelated commit. It was never documented.

Since the method is essentially useless, I suggest we remove it completely.

This comment has been minimized.

@3tty0n

3tty0n Feb 28, 2017

Contributor

@gmethvim OK, I remove certs in FakeRequest completely in this PR. May I change the title of this PR to such as Remove useless method in FakeRequest and ... ?

@3tty0n

3tty0n Feb 28, 2017

Contributor

@gmethvim OK, I remove certs in FakeRequest completely in this PR. May I change the title of this PR to such as Remove useless method in FakeRequest and ... ?

@3tty0n 3tty0n changed the title from Add type ascription to certs and withMultipartFormDateBody in FakeRequest to Add type ascription to withMultipartFormDateBody in FakeRequest and remove useless method Feb 28, 2017

@3tty0n 3tty0n changed the title from Add type ascription to withMultipartFormDateBody in FakeRequest and remove useless method to Add type ascription in `FakeRequest` and remove useless method Feb 28, 2017

@3tty0n 3tty0n changed the title from Add type ascription in `FakeRequest` and remove useless method to Add type ascription in play.api.test.Fakes.scala, and remove useless method Feb 28, 2017

@gmethvin gmethvin merged commit 99bf1ce into playframework:master Feb 28, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
typesafe-cla-validator All users have signed the CLA
Details

@3tty0n 3tty0n deleted the 3tty0n:ascribe-type branch Mar 1, 2017

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