Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
squito committed Mar 20, 2015
1 parent 7fd156a commit 5f9df24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ class JsonRootResource extends UIRootFromServletContext {
}

object JsonRootResource {
def getJsonServlet(uiRoot: UIRoot) = {

def getJsonServlet(uiRoot: UIRoot): ServletContextHandler = {
val jerseyContext = new ServletContextHandler(ServletContextHandler.NO_SESSIONS)
jerseyContext.setContextPath("/json")
val holder:ServletHolder = new ServletHolder(classOf[ServletContainer])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,12 @@ class OneStageAttemptResource(uiRoot: UIRoot) {
val stageAttempts = stageAndStatus.flatMap{ case (status, stages) =>
stages.filter { _.stageId == stageId }.map{_.attemptId}
}
if (stageAttempts.isEmpty)
if (stageAttempts.isEmpty) {
throw new NotFoundException(s"unknown stage: $stageId")
else
} else {
throw new NotFoundException(s"unknown attempt for stage $stageId. " +
s"Found attempts: ${stageAttempts.mkString("[", ",", "]")}")
}
}

}
Expand Down

0 comments on commit 5f9df24

Please sign in to comment.