In Netty I have seen object member variables assigned locally in class methods quite frequently. Is this a matter of style or is there a programmatic benefit?
I have included a code snippet below:
public ChannelFuture bind() {
validate();
SocketAddress localAddress = this.localAddress;
if (localAddress == null) {
throw new IllegalStateException("localAddress not set");
}
return doBind(localAddress);
}