You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Java 8 also provides OptionalInt container class, it wraps primitive int value instead of Integer, so container object is little bit more lightweight and more precisely conveys the essence. It also lets to avoid unnecessary boxing-unboxing operations in client code. I think it is better to use such approach here. @marcospereira , what do you think of it? I can open a PR and override such methods for java API
Play Version
2.6.4 and above.
API
Java.
Expected Behavior
We need to have Java APIs for
TestServer.runningHttpPort
andTestServer.runningHttpsPort
. Ideally, these APIs will return anOptional<Integer>
.Actual Behavior
We currently have
TestServer.port
which is deprecated:playframework/framework/src/play-test/src/main/scala/play/api/test/TestServer.scala
Lines 72 to 76 in 21ba2d6
And it is recommending to use either
TestServer.runningHttpPort
:playframework/framework/src/play-test/src/main/scala/play/api/test/TestServer.scala
Lines 78 to 81 in 21ba2d6
Or
TestServer.runningHttpsPort
:playframework/framework/src/play-test/src/main/scala/play/api/test/TestServer.scala
Lines 83 to 86 in 21ba2d6
But both are returning
Option[Int]
. That is a Scala API, and we need to add the Java correspondents.The text was updated successfully, but these errors were encountered: