Parcourir la source

Update play2-java application to Play 2.5 (#2772)

Ben McCann il y a 8 ans
Parent
commit
d659f5bf59

+ 1 - 1
frameworks/Java/play2-java/play2-java/README.md

@@ -10,7 +10,7 @@ This is the Play portion of a [benchmarking test suite](../) comparing a variety
 The tests were run with:
 
 * Java 8
-* [Play 2.4.3](http://http://www.playframework.com/)
+* [Play 2.5.14](http://http://www.playframework.com/)
 
 ## Test URLs
 ### JSON Encoding Test

+ 2 - 2
frameworks/Java/play2-java/play2-java/app/utils/Headers.java

@@ -1,9 +1,9 @@
 package utils;
 
+import java.util.concurrent.CompletionStage;
 import org.joda.time.DateTime;
 import org.joda.time.format.DateTimeFormat;
 import org.joda.time.format.DateTimeFormatter;
-import play.libs.F;
 import play.mvc.Action;
 import play.mvc.Http;
 import play.mvc.Result;
@@ -13,7 +13,7 @@ public class Headers extends Action.Simple {
     private static final DateTimeFormatter RFC_1123_DATE_TIME = DateTimeFormat.forPattern("EEE, dd MMM yyyy HH:mm:ss 'GMT'").withZoneUTC();
 
     @Override
-    public F.Promise<Result> call(Http.Context context) throws Throwable {
+    public CompletionStage<Result> call(Http.Context context) {
         context.response().setHeader("Server", "Play2");
         context.response().setHeader("Date", RFC_1123_DATE_TIME.print(new DateTime()));
         return delegate.call(context);

+ 1 - 1
frameworks/Java/play2-java/play2-java/project/plugins.sbt

@@ -1 +1 @@
-addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.3")
+addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.14")