Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-4042

LeanerHandler.sock is always not null

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      It's final, and initialized in the conctructor

      protected final Socket sock;
      
      //...
      
      LearnerHandler(Socket sock, BufferedInputStream bufferedInput, LearnerMaster learnerMaster) throws IOException {
              super("LearnerHandler-" + sock.getRemoteSocketAddress());
              this.sock = sock;
              //...
          }
      

      So there's no need to worry about null-pointer exceptions

      Attachments

        Activity

          People

            Unassigned Unassigned
            lan_ok LiAoNan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: