craigmcc    00/11/20 18:39:07

  Modified:    src/share/org/apache/tomcat/core Tag: tomcat_32
                        RequestImpl.java
  Log:
  Lightly refactor the initialization and recycling code to make it easier to
  subclass this class in an embedded environment.  Should have zero impact on
  usage in standard Tomcat.
  
  Submitted by: Shawn McMurdo <[EMAIL PROTECTED]>
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.52.2.4  +10 -7     
jakarta-tomcat/src/share/org/apache/tomcat/core/Attic/RequestImpl.java
  
  Index: RequestImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Attic/RequestImpl.java,v
  retrieving revision 1.52.2.3
  retrieving revision 1.52.2.4
  diff -u -r1.52.2.3 -r1.52.2.4
  --- RequestImpl.java  2000/11/10 02:50:01     1.52.2.3
  +++ RequestImpl.java  2000/11/21 02:39:06     1.52.2.4
  @@ -167,7 +167,7 @@
       public RequestImpl() {
        //      System.out.println("XXX new ri " );
        headers = new MimeHeaders();
  -     recycle(); // XXX need better placement-super()
  +     initRequest();
       }
   
       public void setContext(Context context) {
  @@ -694,12 +694,7 @@
        }
       }
   
  -    // -------------------- End utils
  -    public void recycle() {
  -        if( requestFacade != null && context!=null ) {
  -            context.getFacadeManager().recycle(this);
  -        }
  -
  +    private void initRequest() {
           context = null;
           attributes.clear();
           parameters.clear();
  @@ -746,6 +741,14 @@
           notAuthenticated=true;
        userRoles=null;
        reqRoles=null;
  +    }
  +
  +    // -------------------- End utils
  +    public void recycle() {
  +        if( requestFacade != null && context != null ) {
  +         context.getFacadeManager().recycle(this);
  +     }
  +     initRequest();
       }
   
       public MimeHeaders getMimeHeaders() {
  
  
  

Reply via email to