You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "nami (Jira)" <ji...@apache.org> on 2021/01/16 16:17:00 UTC
[jira] [Commented] (ZOOKEEPER-4042) LeanerHandler.sock is always
not null
[ https://issues.apache.org/jira/browse/ZOOKEEPER-4042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17266621#comment-17266621 ]
nami commented on ZOOKEEPER-4042:
---------------------------------
I like your post, keep bubbling friend, looking for more articles from you. Connect with me :D
[[#https://wminecraft.net/minecraft-fabric-api/]|https://wminecraft.net/minecraft-fabric-api/]
> LeanerHandler.sock is always not null
> -------------------------------------
>
> Key: ZOOKEEPER-4042
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4042
> Project: ZooKeeper
> Issue Type: Improvement
> Reporter: LiAoNan
> Priority: Major
>
> It's final, and initialized in the conctructor
> {code:java}
> protected final Socket sock;
> //...
> LearnerHandler(Socket sock, BufferedInputStream bufferedInput, LearnerMaster learnerMaster) throws IOException {
> super("LearnerHandler-" + sock.getRemoteSocketAddress());
> this.sock = sock;
> //...
> }
> {code}
> So there's no need to worry about null-pointer exceptions
--
This message was sent by Atlassian Jira
(v8.3.4#803005)