[Yanel-commits] rev 21642 - public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources

michi at wyona.com michi at wyona.com
Thu Jan 11 14:40:41 CET 2007


Author: michi
Date: 2007-01-11 14:40:39 +0100 (Thu, 11 Jan 2007)
New Revision: 21642

Modified:
   public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
Log:
do not set parameters when null

Modified: public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
===================================================================
--- public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java	2007-01-11 13:39:21 UTC (rev 21641)
+++ public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java	2007-01-11 13:40:39 UTC (rev 21642)
@@ -103,8 +103,10 @@
                 transformer.setParameter("yanel.back2context", backToRoot(getPath(), ""));
                 transformer.setParameter("yarep.back2realm", backToRoot(getPath(), ""));
                 String userAgent = getRequest().getHeader("User-Agent");
-                transformer.setParameter("os", getOS(userAgent));
-                transformer.setParameter("client", getClient(userAgent));
+                String os = getOS(userAgent);
+                if (os != null) transformer.setParameter("os", os);
+                String client = getClient(userAgent);
+                if (client != null) transformer.setParameter("client", client);
                 transformer.setParameter("language", getLanguage());
 
                 // TODO: Is this the best way to generate an InputStream from an OutputStream?




More information about the Yanel-commits mailing list