X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Futil%2Fhandler%2Fssh%2Fauthentication%2FLoginPassword.java;h=c482e77735348833a3eeda204d51698af1f50071;hp=bb0d37899d7bfd0d5486d4ad22872f49313d4309;hb=87837c5398976e1f44418e9f161efea9d5fa4e7c;hpb=a1b55fb491e235c028e1d451aff4b1d261d5a86c 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."); + } } }