public void authenticate(Connection connection) throws IOException {
boolean isAuthenticated = connection.authenticateWithPassword(username, password);
- if (isAuthenticated == false)
+ if (isAuthenticated == false) {
throw new IOException("Authentication failed.");
+ }
}
}