myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manol...@apache.org
Subject cvs commit: incubator-myfaces/src/myfaces/org/apache/myfaces/context/servlet CookieMap.java
Date Wed, 24 Nov 2004 13:40:11 GMT
manolito    2004/11/24 05:40:11

  Modified:    src/myfaces/org/apache/myfaces/context/servlet
                        CookieMap.java
  Log:
  additional null cookies fixes
  
  Revision  Changes    Path
  1.10      +8 -3      incubator-myfaces/src/myfaces/org/apache/myfaces/context/servlet/CookieMap.java
  
  Index: CookieMap.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/src/myfaces/org/apache/myfaces/context/servlet/CookieMap.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- CookieMap.java	24 Nov 2004 13:36:11 -0000	1.9
  +++ CookieMap.java	24 Nov 2004 13:40:11 -0000	1.10
  @@ -27,6 +27,9 @@
    * @author Anton Koinov
    * @version $Revision$ $Date$
    * $Log$
  + * Revision 1.10  2004/11/24 13:40:11  manolito
  + * additional null cookies fixes
  + *
    * Revision 1.9  2004/11/24 13:36:11  manolito
    * SF-Bug #1072442 fixed
    *
  @@ -88,12 +91,14 @@
   
       public boolean isEmpty()
       {
  -        return _httpServletRequest.getCookies().length == 0;
  +        Cookie[] cookies = _httpServletRequest.getCookies();
  +        return cookies == null || cookies.length == 0;
       }
   
       public int size()
       {
  -        return _httpServletRequest.getCookies().length;
  +        Cookie[] cookies = _httpServletRequest.getCookies();
  +        return cookies == null ? 0 : cookies.length;
       }
   
       protected Object getAttribute(String key)
  
  
  

Mime
View raw message