hammant     02/03/29 01:03:22

  Modified:    altrmi/src/java/org/apache/commons/altrmi/server/impl
                        StreamServerConnection.java
  Log:
  Fix NPE during broken connection (from Leif Mortenson)
  
  Revision  Changes    Path
  1.10      +6 -5      
jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/StreamServerConnection.java
  
  Index: StreamServerConnection.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/StreamServerConnection.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- StreamServerConnection.java       13 Mar 2002 08:30:30 -0000      1.9
  +++ StreamServerConnection.java       29 Mar 2002 09:03:22 -0000      1.10
  @@ -33,7 +33,7 @@
    *
    *
    * @author Paul Hammant <a 
href="mailto:[EMAIL PROTECTED]";>[EMAIL PROTECTED]</a>
  - * @version $Revision: 1.9 $
  + * @version $Revision: 1.10 $
    */
   public abstract class StreamServerConnection implements Runnable, 
AltrmiServerConnection, LogEnabled {
   
  @@ -95,10 +95,11 @@
                   } catch (IOException ioe) {
                       more = false;
                       if (ioe instanceof SocketException
  -                            | 
ioe.getClass().getName().equals("java.net.SocketTimeoutException")
  -                            | ioe instanceof InterruptedIOException
  -                            | ioe.getMessage().equals("Write end dead")
  -                            | ioe.getMessage().equals("Pipe broken")) {
  +                            || 
ioe.getClass().getName().equals("java.net.SocketTimeoutException")
  +                            || ioe instanceof InterruptedIOException
  +                            || (ioe.getMessage() != null
  +                            && (ioe.getMessage().equals("Write end dead")
  +                            || ioe.getMessage().equals("Pipe broken")))) {
                           // TODO implement implementation indepandant logger
                           mLogger.info("One Connection closed.");
                       } else {
  
  
  

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

Reply via email to