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%2Fclient%2FInvoker.java;h=fffb304d26be7b3b32787fa1ae43e5392023bbd8;hb=4fee0ccd36697c748340eb0d836864699e213da9;hp=12d1129daff5c6b3c4a7aa4324e4de14385a9347;hpb=caee336f062eba4909ba53cbaccdde0714236134;p=controller.git diff --git a/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/client/Invoker.java b/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/client/Invoker.java index 12d1129daf..fffb304d26 100644 --- a/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/client/Invoker.java +++ b/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/client/Invoker.java @@ -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); }