Merge "Resolve Bug:853 - remove groovy from config code generator."
[controller.git] / opendaylight / netconf / netconf-util / src / main / java / org / opendaylight / controller / netconf / util / handler / ssh / authentication / LoginPassword.java
index bb0d37899d7bfd0d5486d4ad22872f49313d4309..c482e77735348833a3eeda204d51698af1f50071 100644 (file)
@@ -13,7 +13,8 @@ import ch.ethz.ssh2.Connection;
 import java.io.IOException;
 
 /**
- * Class Providing username/password authentication option to {@link org.opendaylight.controller.netconf.util.handler.ssh.SshHandler}
+ * Class Providing username/password authentication option to
+ * {@link org.opendaylight.controller.netconf.util.handler.ssh.SshHandler}
  */
 public class LoginPassword extends AuthenticationHandler {
     private final String username;
@@ -28,6 +29,8 @@ public class LoginPassword extends AuthenticationHandler {
     public void authenticate(Connection connection) throws IOException {
         boolean isAuthenticated = connection.authenticateWithPassword(username, password);
 
-        if (isAuthenticated == false) throw new IOException("Authentication failed.");
+        if (!isAuthenticated) {
+            throw new IOException("Authentication failed.");
+        }
     }
 }