vmassol     2003/06/22 10:02:27

  Modified:    framework/src/java/share/org/apache/cactus
                        BaseWebRequest.java
  Log:
  Prevent adding a null cookie
  
  Revision  Changes    Path
  1.7       +6 -1      
jakarta-cactus/framework/src/java/share/org/apache/cactus/BaseWebRequest.java
  
  Index: BaseWebRequest.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/BaseWebRequest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- BaseWebRequest.java       15 Jun 2003 16:28:00 -0000      1.6
  +++ BaseWebRequest.java       22 Jun 2003 17:02:27 -0000      1.7
  @@ -438,6 +438,11 @@
        */
       public void addCookie(Cookie theCookie)
       {
  +        if (theCookie == null)
  +        {
  +            throw new IllegalStateException(
  +                "The cookie cannot be null");           
  +        }
           this.cookies.addElement(theCookie);
       }
   
  
  
  

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

Reply via email to