From: Robert Varga Date: Tue, 31 May 2022 18:21:31 +0000 (+0200) Subject: Remove superfluous this. qualifier X-Git-Tag: v4.0.0~69 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=d31802bfa8ab119aa41c4a859446764480424d9d;hp=90dcdd5d040eb22b74e87baccffd70a30d93bfc0;p=netconf.git Remove superfluous this. qualifier We have some unnecessary verbosity here, ditch it to simplify access. Change-Id: Idf94706a60169741e7e5a4deec0f17cf87a313d8 Signed-off-by: Robert Varga --- diff --git a/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/NetconfSessionPromise.java b/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/NetconfSessionPromise.java index b0de043e51..5aba2df34e 100644 --- a/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/NetconfSessionPromise.java +++ b/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/NetconfSessionPromise.java @@ -45,17 +45,17 @@ final class NetconfSessionPromise extends DefaultPromi @SuppressWarnings("checkstyle:illegalCatch") synchronized void connect() { try { - final int timeout = this.strategy.getConnectTimeout(); + final int timeout = strategy.getConnectTimeout(); LOG.debug("Promise {} attempting connect for {}ms", this, timeout); - if (this.address.isUnresolved()) { - this.address = new InetSocketAddress(this.address.getHostName(), this.address.getPort()); + if (address.isUnresolved()) { + address = new InetSocketAddress(address.getHostName(), address.getPort()); } - final ChannelFuture connectFuture = this.bootstrap.connect(this.address); + final ChannelFuture connectFuture = bootstrap.connect(address); // Add listener that attempts reconnect by invoking this method again. connectFuture.addListener(new BootstrapConnectListener()); - this.pending = connectFuture; + pending = connectFuture; } catch (final Exception e) { LOG.info("Failed to connect to {}", address, e); setFailure(e); @@ -65,7 +65,7 @@ final class NetconfSessionPromise extends DefaultPromi @Override public synchronized boolean cancel(final boolean mayInterruptIfRunning) { if (super.cancel(mayInterruptIfRunning)) { - this.pending.cancel(mayInterruptIfRunning); + pending.cancel(mayInterruptIfRunning); return true; } @@ -75,7 +75,7 @@ final class NetconfSessionPromise extends DefaultPromi @Override public synchronized Promise setSuccess(final S result) { LOG.debug("Promise {} completed", this); - this.strategy.reconnectSuccessful(); + strategy.reconnectSuccessful(); return super.setSuccess(result); } @@ -87,7 +87,7 @@ final class NetconfSessionPromise extends DefaultPromi LOG.debug("Promise {} connection resolved", NetconfSessionPromise.this); // Triggered when a connection attempt is resolved. - checkState(NetconfSessionPromise.this.pending.equals(cf)); + checkState(pending.equals(cf)); /* * The promise we gave out could have been cancelled, @@ -111,11 +111,11 @@ final class NetconfSessionPromise extends DefaultPromi return; } - LOG.debug("Attempt to connect to {} failed", NetconfSessionPromise.this.address, cf.cause()); + LOG.debug("Attempt to connect to {} failed", address, cf.cause()); - final Future rf = NetconfSessionPromise.this.strategy.scheduleReconnect(cf.cause()); + final Future rf = strategy.scheduleReconnect(cf.cause()); rf.addListener(new ReconnectingStrategyListener()); - NetconfSessionPromise.this.pending = rf; + pending = rf; } } @@ -124,7 +124,7 @@ final class NetconfSessionPromise extends DefaultPromi public void operationComplete(final Future sf) { synchronized (NetconfSessionPromise.this) { // Triggered when a connection attempt is to be made. - checkState(NetconfSessionPromise.this.pending.equals(sf)); + checkState(pending.equals(sf)); /* * The promise we gave out could have been cancelled,