You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bu...@apache.org on 2003/01/07 10:43:11 UTC

DO NOT REPLY [Bug 15831] New: - NullPointerException in org.apache.james.smtpserver.SMTPHandler

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15831>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15831

NullPointerException in org.apache.james.smtpserver.SMTPHandler

           Summary: NullPointerException in
                    org.apache.james.smtpserver.SMTPHandler
           Product: James
           Version: 2.1
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: SMTPServer
        AssignedTo: james-dev@jakarta.apache.org
        ReportedBy: sanz@denic.de


I have some NullPointerExceptions in my log file because of this line:

final String readCommandLine() throws IOException {
      return inReader.readLine().trim();
}

Wouldn't it be much smarter:

final String readCommandLine() throws IOException {
      String line = inReader.readLine();
      if (null == line)
            return null;
      else
            return line.trim();
}

I don't think it breaks any code this way.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>