Remove volatile from field as its not needed.
Motivation: We not need to mark the field as volatile and so this may confuse people. Modifications: Remove volatile and add comment to explain why its not needed. Result: More correct example.
This commit is contained in:
parent
be77dfb1ca
commit
979d775f5f
@ -29,7 +29,9 @@ public class HexDumpProxyFrontendHandler extends ChannelInboundHandlerAdapter {
|
||||
private final String remoteHost;
|
||||
private final int remotePort;
|
||||
|
||||
private volatile Channel outboundChannel;
|
||||
// As we use inboundChannel.eventLoop() when buildling the Bootstrap this does not need to be volatile as
|
||||
// the outboundChannel will use the same EventLoop (and therefore Thread) as the inboundChannel.
|
||||
private Channel outboundChannel;
|
||||
|
||||
public HexDumpProxyFrontendHandler(String remoteHost, int remotePort) {
|
||||
this.remoteHost = remoteHost;
|
||||
|
Loading…
x
Reference in New Issue
Block a user