luehe       2004/04/14 18:54:07

  Modified:    catalina/src/share/org/apache/coyote/tomcat5
                        CoyoteResponse.java
  Log:
  "Hide" Throwable.initCause() inside Jdk14Compat, in order to preserver BC with J2SE 
1.3
  
  Revision  Changes    Path
  1.15      +16 -6     
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteResponse.java
  
  Index: CoyoteResponse.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteResponse.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- CoyoteResponse.java       14 Apr 2004 17:40:54 -0000      1.14
  +++ CoyoteResponse.java       15 Apr 2004 01:54:07 -0000      1.15
  @@ -54,6 +54,7 @@
   import org.apache.tomcat.util.http.MimeHeaders;
   import org.apache.tomcat.util.http.ServerCookie;
   import org.apache.tomcat.util.net.URL;
  +import org.apache.tomcat.util.compat.JdkCompat;
   
   /**
    * Wrapper object for the Coyote response.
  @@ -75,12 +76,13 @@
       }
   
   
  -    // ----------------------------------------------------- Instance Variables
  +    // ----------------------------------------------------- Class Variables
  +
   
       /**
  -     * The date format we will use for creating date headers.
  +     * JDK compatibility support
        */
  -    protected SimpleDateFormat format = null;
  +    private static final JdkCompat jdkCompat = JdkCompat.getJdkCompat();
   
   
       /**
  @@ -97,6 +99,14 @@
           StringManager.getManager(Constants.Package);
   
   
  +    // ----------------------------------------------------- Instance Variables
  +
  +    /**
  +     * The date format we will use for creating date headers.
  +     */
  +    protected SimpleDateFormat format = null;
  +
  +
       // ------------------------------------------------------------- Properties
   
   
  @@ -1440,7 +1450,7 @@
                           } catch (PrivilegedActionException pae){
                               IllegalArgumentException iae =
                                   new IllegalArgumentException(location);
  -                            iae.initCause(pae.getCause());
  +                            jdkCompat.chainException(iae, pae.getCause());
                               throw iae;
                           }
                       } else {
  @@ -1453,7 +1463,7 @@
               } catch (IOException e) {
                   IllegalArgumentException iae =
                       new IllegalArgumentException(location);
  -                iae.initCause(e);
  +                jdkCompat.chainException(iae, e);
                   throw iae;
               }
   
  
  
  

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

Reply via email to