SQL: Clean up catch

Use a mutli-catch because it is a little cleaner.

Original commit: elastic/x-pack-elasticsearch@8555e82bca
This commit is contained in:
Nik Everett 2018-03-13 10:05:03 -04:00
parent 47a2f63d5e
commit 5c3b69fe57
1 changed files with 1 additions and 3 deletions

View File

@ -117,9 +117,7 @@ public class JLineTerminal implements CliTerminal {
throw new UserException(ExitCodes.NOPERM, "password required");
}
return password;
} catch (UserInterruptException ex) {
throw new UserException(ExitCodes.NOPERM, "password required");
} catch (EndOfFileException ex) {
} catch (UserInterruptException | EndOfFileException ex) {
throw new UserException(ExitCodes.NOPERM, "password required");
}
}