Merge "Bug 616 - Eliminate the use of xtend in md-sal/topology-lldp-discovery"
[controller.git] / opendaylight / netconf / netconf-util / src / main / java / org / opendaylight / controller / netconf / util / handler / ssh / client / Invoker.java
index 12d1129daff5c6b3c4a7aa4324e4de14385a9347..fffb304d26be7b3b32787fa1ae43e5392023bbd8 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 package org.opendaylight.controller.netconf.util.handler.ssh.client;
 
 import java.io.IOException;
@@ -12,6 +19,7 @@ public abstract class Invoker {
     private Invoker(){}
 
     protected boolean isInvoked() {
+        // TODO invoked is always false
         return invoked;
     }
 
@@ -27,7 +35,9 @@ public abstract class Invoker {
         return new Invoker() {
             @Override
             void invoke(SshSession session) throws IOException {
-                if (isInvoked() == true) throw new IllegalStateException("Already invoked.");
+                if (isInvoked()) {
+                    throw new IllegalStateException("Already invoked.");
+                }
 
                 session.startSubSystem(subsystem);
             }