package controllers;

import java.util.*;
import java.util.concurrent.TimeUnit;

import play.mvc.*;
import play.mvc.Http.*;
import play.data.*;
import play.*;

import views.html.*;

import models.*;

public class JavaApplication extends Controller {

  public static Result upload() {
    MultipartFormData body = request().body().asMultipartFormData();
    MultipartFormData.FilePart uploadedFile = body.getFile("uploadedFile");
    if (uploadedFile == null) {
      return ok("Error when uploading");
    } else {
      String fileName = uploadedFile.getFilename();
      String contentType = uploadedFile.getContentType();
      return ok("File uploaded:" + fileName);
    }
  }

  @BodyParser.Of(BodyParser.MultipartFormData.class)
  public static Result upload2() {
    return upload();
  }

  public static Result longRequest(Long duration) {
    try {
      Thread.sleep(TimeUnit.SECONDS.toMillis(duration));
    } catch (InterruptedException e) {
      throw new RuntimeException(e.getMessage(), e);
    }
    return ok();
  }
}
            

@@ -844,22 +844,27 @@
 on) 
-%7B%0A    try
+throws Exception
  %7B%0A
-  
     
@@ -918,106 +918,8 @@
 ));%0A
-    %7D catch (InterruptedException e) %7B%0A      throw new RuntimeException(e.getMessage(), e);%0A    %7D%0A
     

Remove useless code