keith       01/05/21 07:59:06

  Modified:    src/share/org/apache/tomcat/util Tag: tomcat_32
                        RequestUtil.java
  Log:
  There is a lingering bug in (at least) Sun's JDK
  that causes SimpleDateFormat to occasionaly throw a
  StringIndexOutOfBoundsException instead of a
  ParseException.
  
  <http://developer.java.sun.com/developer/bugParade/bugs/4212077.html>
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.14.2.5  +3 -0      
jakarta-tomcat/src/share/org/apache/tomcat/util/Attic/RequestUtil.java
  
  Index: RequestUtil.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/Attic/RequestUtil.java,v
  retrieving revision 1.14.2.4
  retrieving revision 1.14.2.5
  diff -u -r1.14.2.4 -r1.14.2.5
  --- RequestUtil.java  2001/05/11 22:34:28     1.14.2.4
  +++ RequestUtil.java  2001/05/21 14:58:57     1.14.2.5
  @@ -572,17 +572,20 @@
        try {
               date = rfc1123Format.parse(dateString);
        } catch (ParseException e) { }
  +          catch (StringIndexOutOfBoundsException e) { }
        
           if( date==null)
            try {
                date = rfc1036Format.parse(dateString);
            } catch (ParseException e) { }
  +              catch (StringIndexOutOfBoundsException e) { }
        
           if( date==null)
            try {
                date = asctimeFormat.parse(dateString);
            } catch (ParseException pe) {
            }
  +              catch (StringIndexOutOfBoundsException e) { }
   
        if(date==null) {
            return -1;
  
  
  

Reply via email to