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/BrowserImpl.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]