You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/12/03 17:53:00 UTC

[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #6210: Update Traffic Router Java version to 11

zrhoffman commented on a change in pull request #6210:
URL: https://github.com/apache/trafficcontrol/pull/6210#discussion_r762135707



##########
File path: traffic_router/connector/src/main/java/org/apache/traffic_control/traffic_router/protocol/RouterNioEndpoint.java
##########
@@ -151,8 +151,9 @@ public RouterSocketProcessor(final SocketWrapperBase<NioChannel> socketWrapper,
 		*/
 		@Override
 		protected void doRun(){
-			final SocketWrapperBase<NioChannel> localWrapper = socketWrapper;
-			final NioChannel socket = localWrapper.getSocket();
+			@SuppressWarnings("PMD.CloseResource")
+			// The socket must be stored before calling super.doRun() because it sets socketWrapper to null
+			final NioChannel socket = socketWrapper.getSocket();

Review comment:
       Neat, removed in 0d2cc14ee5.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org