[CORE][MINOR] Fix obvious error and compiling for Scala 2.12.7

## What changes were proposed in this pull request?

Fix an obvious error.

## How was this patch tested?

Existing tests.

Closes #22577 from sadhen/minor_fix.

Authored-by: Darcy Shen <sadhen@zoho.com>
Signed-off-by: Sean Owen <sean.owen@databricks.com>
This commit is contained in:
Darcy Shen 2018-09-30 09:00:23 -05:00 committed by Sean Owen
parent a2f502cf53
commit 40e6ed8940

View file

@ -175,7 +175,7 @@ private[v1] class OneApplicationAttemptResource extends AbstractApplicationResou
def getAttempt(): ApplicationAttemptInfo = {
uiRoot.getApplicationInfo(appId)
.flatMap { app =>
app.attempts.filter(_.attemptId == attemptId).headOption
app.attempts.find(_.attemptId.contains(attemptId))
}
.getOrElse {
throw new NotFoundException(s"unknown app $appId, attempt $attemptId")