vmassol     2003/06/07 06:51:33

  Modified:    samples/servlet/src/test-cactus/share/org/apache/cactus/sample/unit
                        TestSetURL.java
               framework/src/java/share/org/apache/cactus ServletURL.java
               framework/src/java/share/org/apache/cactus/server
                        AbstractHttpServletRequestWrapper.java
               documentation/docs/xdocs changes.xml
  Log:
  Removed error introduced by previous refactoring. Namely getPathInfo() can return 
null.
  
  Revision  Changes    Path
  1.9       +3 -2      
jakarta-cactus/samples/servlet/src/test-cactus/share/org/apache/cactus/sample/unit/TestSetURL.java
  
  Index: TestSetURL.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/samples/servlet/src/test-cactus/share/org/apache/cactus/sample/unit/TestSetURL.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestSetURL.java   7 Jun 2003 13:07:51 -0000       1.8
  +++ TestSetURL.java   7 Jun 2003 13:51:32 -0000       1.9
  @@ -257,6 +257,7 @@
           assertTrue(request.getServerPort() > 0);
           assertNotNull(request.getContextPath());       
           assertNotNull(request.getServletPath());       
  -        assertEquals("", request.getPathInfo());       
  +        assertNull(request.getPathInfo());       
  +        assertNull(request.getQueryString());       
       }
   }
  
  
  
  1.15      +3 -5      
jakarta-cactus/framework/src/java/share/org/apache/cactus/ServletURL.java
  
  Index: ServletURL.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/ServletURL.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ServletURL.java   7 Jun 2003 11:26:05 -0000       1.14
  +++ ServletURL.java   7 Jun 2003 13:51:32 -0000       1.15
  @@ -235,8 +235,7 @@
        * @param thePathInfo   the path info in the URL to simulate, i.e. this is
        *                      the name that will be returned by the
        *                      <code>HttpServletRequest.getPathInfo()</code>. Can
  -     *                      be null. If null, then no extra path will be set.
  -     *                      Format : "/" + name.
  +     *                      be null. Format : "/" + name.
        * @param theQueryString the Query string in the URL to simulate, i.e. this
        *                       is the string that will be returned by the
        *                       <code>HttpServletResquest.getQueryString()</code>.
  @@ -279,8 +278,7 @@
        * @param thePathInfo   the path info in the URL to simulate, i.e. this is
        *                      the name that will be returned by the
        *                      <code>HttpServletRequest.getPathInfo()</code>. Can
  -     *                      be null. If null, then no extra path will be set.
  -     *                      Format : "/" + name.
  +     *                      be null. Format : "/" + name.
        * @param theQueryString the Query string in the URL to simulate, i.e. this
        *                       is the string that will be returned by the
        *                       <code>HttpServletResquest.getQueryString()</code>.
  
  
  
  1.17      +3 -12     
jakarta-cactus/framework/src/java/share/org/apache/cactus/server/AbstractHttpServletRequestWrapper.java
  
  Index: AbstractHttpServletRequestWrapper.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/server/AbstractHttpServletRequestWrapper.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- AbstractHttpServletRequestWrapper.java    7 Jun 2003 13:07:51 -0000       1.16
  +++ AbstractHttpServletRequestWrapper.java    7 Jun 2003 13:51:32 -0000       1.17
  @@ -185,9 +185,7 @@
   
       /**
        * @return the path info from the simulated URL or the real path info
  -     *         if a simulation URL has not been defined. If the path info
  -     *         value defined in the simulated URL is null, return an empty
  -     *         string.
  +     *         if a simulation URL has not been defined.
        */
       public String getPathInfo()
       {
  @@ -195,14 +193,7 @@
   
           if (this.url != null)
           {
  -            if (this.url.getPathInfo() == null)
  -            {
  -                result = "";
  -            }
  -            else
  -            {
  -                result = this.url.getPathInfo();
  -            }
  +            result = this.url.getPathInfo();
               LOGGER.debug("Using simulated PathInfo : [" + result + "]");
           }
           else
  
  
  
  1.103     +0 -10     jakarta-cactus/documentation/docs/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/documentation/docs/xdocs/changes.xml,v
  retrieving revision 1.102
  retrieving revision 1.103
  diff -u -r1.102 -r1.103
  --- changes.xml       7 Jun 2003 13:07:51 -0000       1.102
  +++ changes.xml       7 Jun 2003 13:51:32 -0000       1.103
  @@ -66,16 +66,6 @@
   
         <release version="1.5" date="- in CVS">
           <action dev="VMA" type="fix">
  -          Modified the behavior of Cactus
  -          <code>HttpServletRequestWrapper.getPathInfo()</code>
  -          when a Simulation URL is defined: if the call to 
  -          <code>WebRequest.setURL()</code> passes a <code>null</code> value
  -          for the Path Info parameter, a call to
  -          <code>HttpServletRequestWrapper.getPathInfo()</code> now returns an 
  -          empty string ("") instead of a <code>null</code> value. This is in
  -          accordance with the Servlet Specification.
  -        </action>
  -        <action dev="VMA" type="fix">
             When a simulation URL is used and null values are passed for the
             Server name, Context Path and Servlet Path parameters, calls to 
             Cactus <code>HttpServletRequestWrapper.getServerName()</code>,
  
  
  

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

Reply via email to