Browse Source

Removed the async call from translating to Json - waste of time given that it is a short-running operation

Christopher Hunt 12 years ago
parent
commit
8cebc405f8
1 changed files with 3 additions and 10 deletions
  1. 3 10
      play-java/app/controllers/Application.java

+ 3 - 10
play-java/app/controllers/Application.java

@@ -22,16 +22,9 @@ public class Application extends Controller {
     private static final ObjectMapper objectMapper = new ObjectMapper();
 
     public static Result json() {
-        return async(
-          future(new Callable<Result>() {
-              @Override
-              public Result call() {
-                  final ObjectNode result = objectMapper.createObjectNode();
-                  result.put("message", "Hello World!");
-                  return ok(result);
-              }
-          })
-        );
+        final ObjectNode result = objectMapper.createObjectNode();
+        result.put("message", "Hello World!");
+        return ok(result);
     }
 
     public static Result db(final Integer queries) {