Bug 460 - Fix warning throughout netconf subsystem
[controller.git] / opendaylight / netconf / netconf-util / src / main / java / org / opendaylight / controller / netconf / util / handler / ssh / client / SshClientAdapter.java
index 6350dd154415b510515f919d94c88d06ecac5314..244bcc0041c963988aa8fc78c712767fc7c643c2 100644 (file)
@@ -64,7 +64,7 @@ public class SshClientAdapter implements Runnable {
                 }
             }
 
-            while (stopRequested.get() == false) {
+            while (!stopRequested.get()) {
                 byte[] readBuff = new byte[BUFFER_SIZE];
                 int c = stdOut.read(readBuff);
                 if (c == -1) {
@@ -82,7 +82,7 @@ public class SshClientAdapter implements Runnable {
             // Netty closed connection prematurely.
             // Just pass and move on.
         } catch (Exception e) {
-            throw new RuntimeException(e);
+            throw new IllegalStateException(e);
         } finally {
             sshClient.close();