Fix checkstyle in BGPSessionStateImpl 19/80819/2
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 13 Mar 2019 10:43:22 +0000 (11:43 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 13 Mar 2019 11:46:09 +0000 (12:46 +0100)
This fixes field shadowing by adding a 'new' prefix.

Change-Id: I666c7475dfc6e0529ebbd47db9420019e3f8fe18
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/state/BGPSessionStateImpl.java

index 0544867dcc311e73d0d82cd8de5c8aef0076314a..b3a919b743cf31eadcdc44049d9981d03ba5e6a6 100644 (file)
@@ -78,7 +78,7 @@ public final class BGPSessionStateImpl implements BGPSessionState, BGPTimersStat
     }
 
     @Override
-    public synchronized void advertizeCapabilities(final int holdTimerValue, final SocketAddress remoteAddress,
+    public synchronized void advertizeCapabilities(final int newHoldTimerValue, final SocketAddress newRemoteAddress,
         final SocketAddress localAddress, final Set<BgpTableType> tableTypes, final List<BgpParameters> bgpParameters) {
         if (bgpParameters != null && !bgpParameters.isEmpty()) {
             for (final BgpParameters parameters : bgpParameters) {
@@ -107,9 +107,9 @@ public final class BGPSessionStateImpl implements BGPSessionState, BGPTimersStat
             }
         }
 
-        this.holdTimerValue = holdTimerValue;
-        this.remoteAddress = StrictBGPPeerRegistry.getIpAddress(remoteAddress);
-        this.remotePort = new PortNumber(((InetSocketAddress) remoteAddress).getPort());
+        this.holdTimerValue = newHoldTimerValue;
+        this.remoteAddress = StrictBGPPeerRegistry.getIpAddress(newRemoteAddress);
+        this.remotePort = new PortNumber(((InetSocketAddress) newRemoteAddress).getPort());
         this.localPort = new PortNumber(((InetSocketAddress) localAddress).getPort());
     }