Hi Ovidiu ,

thanks! I applied your patch - please cross check.


Carsten 

Open Source Group                        sunShine - b:Integrated
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de                          mailto: [EMAIL PROTECTED] 
================================================================


> -----Ursprungliche Nachricht-----
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag
> von Ovidiu Predescu
> Gesendet: Donnerstag, 7. Juni 2001 00:48
> An: [EMAIL PROTECTED]
> Betreff: [PATCH] [C2] BrowserImpl.xsl
> 
> 
> This patch fixes a null pointer exception when passing browser
> capabilities to the stylesheet, for browsers which are not described
> in the XML database.
> 
> -- 
> Ovidiu Predescu <[EMAIL PROTECTED]>
> http://orion.nsr.hp.com/ (inside HP's firewall only)
> http://www.geocities.com/SiliconValley/Monitor/7464/ (GNU, Emacs, 
> other stuff)
> 
> 
> Index: src/org/apache/cocoon/components/browser/BrowserImpl.xsl
> ===================================================================
> RCS file: 
> /Repository/Cocoon2/src/org/apache/cocoon/components/browser/Brows
> erImpl.xsl,v
> retrieving revision 1.1.1.1
> diff -u -I'\$Id:.*\$' -I'\$Author:.*\$' -I'\$Revision:.*\$' 
> -r1.1.1.1 BrowserImpl.xsl
> --- BrowserImpl.xsl   2001/05/08 18:42:19     1.1.1.1
> +++ BrowserImpl.xsl   2001/06/06 22:30:44
> @@ -87,7 +87,7 @@
>      output markup for this browser. Note that this may also affect the
>      DOCTYPE that's placed in the resulting XML document.</li>
>  
> -    <li><code>has-access-key</code> - whether the browser understands
> +    <li><code>has-accesskey</code> - whether the browser understands
>      the <code>accesskey</code> attribute as part of a
>      <code>anchor</code> tag.</li>
>  
> @@ -151,6 +151,9 @@
>     * @return a <code>String</code> value */
>    public HashMap getBrowser(String userAgent, String acceptHeader)
>    {
> +    if (userAgent == null || userAgent.equals(""))
> +      return new HashMap();
> +
>      /* First search for a matching user agent */
>      Iterator iter = byUserAgent.iterator();
>      while (iter.hasNext()) {
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 

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

Reply via email to