james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Closed: (JAMES-78) NullPointerException in org.apache.james.smtpserver.SMTPHandler
Date Sun, 06 Jun 2004 21:11:53 GMT
Message:

   The following issue has been closed.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAMES-78

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAMES-78
    Summary: NullPointerException in org.apache.james.smtpserver.SMTPHandler
       Type: Bug

     Status: Closed
 Resolution: FIXED

    Project: James
 Components: 
             SMTPServer
   Versions:
             2.1

   Assignee: 
   Reporter: Marcos Sanz

    Created: Tue, 7 Jan 2003 9:43 AM
    Updated: Sun, 6 Jun 2004 2:09 PM
Environment: Operating System: Solaris
Platform: Sun

Description:
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.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message