noel        2003/01/16 12:52:15

  Modified:    src/java/org/apache/james/smtpserver Tag: branch_2_1_fcs
                        SMTPHandler.java
  Log:
  Fix NPE exception in readCommandLine
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.35.4.4  +6 -2      
jakarta-james/src/java/org/apache/james/smtpserver/SMTPHandler.java
  
  Index: SMTPHandler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-james/src/java/org/apache/james/smtpserver/SMTPHandler.java,v
  retrieving revision 1.35.4.3
  retrieving revision 1.35.4.4
  diff -u -r1.35.4.3 -r1.35.4.4
  --- SMTPHandler.java  16 Jan 2003 20:13:54 -0000      1.35.4.3
  +++ SMTPHandler.java  16 Jan 2003 20:52:15 -0000      1.35.4.4
  @@ -480,7 +480,11 @@
        * @throws IOException if an exception is generated reading in the input 
characters
        */
       final String readCommandLine() throws IOException {
  -        return inReader.readLine().trim();
  +        String commandLine = inReader.readLine();
  +        if (commandLine != null) {
  +            commandLine = commandLine.trim();
  +        }
  +        return commandLine;
       }
   
       /**
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to