billbarker    01/11/17 21:56:02

  Modified:    src/share/org/apache/tomcat/util/net
                        StreamHandlerFactory.java
  Log:
  One last NPE check.
  
  Revision  Changes    Path
  1.4       +12 -10    
jakarta-tomcat/src/share/org/apache/tomcat/util/net/StreamHandlerFactory.java
  
  Index: StreamHandlerFactory.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/net/StreamHandlerFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StreamHandlerFactory.java 2001/11/12 08:03:53     1.3
  +++ StreamHandlerFactory.java 2001/11/18 05:56:02     1.4
  @@ -131,17 +131,19 @@
        if(protocolString == System.getProperty(SYS_PROTOCOLS)) 
            return;
        String protocolS = System.getProperty(SYS_PROTOCOLS);
  -     StringTokenizer tok = new StringTokenizer(protocolS,"|");
        protocols.clear();
  -     while(tok.hasMoreTokens()) {
  -         String protStr = tok.nextToken();
  -         int hpos = protStr.lastIndexOf(".Handler");
  -         if(hpos >= 0) {
  -             protStr = protStr.substring(0,hpos);
  -             int npos = protStr.lastIndexOf('.');
  -             String prot = protStr.substring(hpos+1);
  -             String protC = protStr.substring(0,hpos);
  -             protocols.put(prot,protC);
  +     if(protocolS != null) {
  +         StringTokenizer tok = new StringTokenizer(protocolS,"|");
  +         while(tok.hasMoreTokens()) {
  +             String protStr = tok.nextToken();
  +             int hpos = protStr.lastIndexOf(".Handler");
  +             if(hpos >= 0) {
  +                 protStr = protStr.substring(0,hpos);
  +                 int npos = protStr.lastIndexOf('.');
  +                 String prot = protStr.substring(hpos+1);
  +                 String protC = protStr.substring(0,hpos);
  +                 protocols.put(prot,protC);
  +             }
            }
        }
        protocolString = protocolS;
  
  
  

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

Reply via email to