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

LeanerHandler.sock is always not null

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      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

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

              Dates

              • Created:
                Updated: