james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcos Sanz/Denic" <s...@denic.de>
Subject NullPointerException in org.apache.james.smtpserver.SMTPHandler
Date Mon, 06 Jan 2003 15:33:50 GMT
Hi,

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.

Regards,
Marcos Sanz
DENIC eG



--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>


Mime
View raw message