X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Futil%2Fhandler%2Fssh%2Fauthentication%2FLoginPassword.java;h=c482e77735348833a3eeda204d51698af1f50071;hb=d166f8ebd062f3a28a6ad7b7eb03988bb9052600;hp=bb0d37899d7bfd0d5486d4ad22872f49313d4309;hpb=4f76ea30ad49331ca38ce63925b3fabf8e769731;p=controller.git diff --git a/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/authentication/LoginPassword.java b/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/authentication/LoginPassword.java index bb0d37899d..c482e77735 100644 --- a/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/authentication/LoginPassword.java +++ b/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/authentication/LoginPassword.java @@ -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."); + } } }