You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bridges-commits@portals.apache.org by ta...@apache.org on 2006/10/31 04:16:43 UTC

svn commit: r469353 - /portals/bridges/trunk/velocity/src/java/org/apache/portals/bridges/velocity/GenericVelocityPortlet.java

Author: taylor
Date: Mon Oct 30 19:16:42 2006
New Revision: 469353

URL: http://svn.apache.org/viewvc?view=rev&rev=469353
Log:
was getting some NPEs here

Modified:
    portals/bridges/trunk/velocity/src/java/org/apache/portals/bridges/velocity/GenericVelocityPortlet.java

Modified: portals/bridges/trunk/velocity/src/java/org/apache/portals/bridges/velocity/GenericVelocityPortlet.java
URL: http://svn.apache.org/viewvc/portals/bridges/trunk/velocity/src/java/org/apache/portals/bridges/velocity/GenericVelocityPortlet.java?view=diff&rev=469353&r1=469352&r2=469353
==============================================================================
--- portals/bridges/trunk/velocity/src/java/org/apache/portals/bridges/velocity/GenericVelocityPortlet.java (original)
+++ portals/bridges/trunk/velocity/src/java/org/apache/portals/bridges/velocity/GenericVelocityPortlet.java Mon Oct 30 19:16:42 2006
@@ -201,7 +201,14 @@
         {
             Map.Entry e = (Map.Entry)f.next();
             String []why = (String[])e.getValue();
-            result.put(e.getKey(), why[0]);            
+            if (why == null || why[0] == null)
+            {
+                result.put(e.getKey(), "");                
+            }
+            else
+            {
+                result.put(e.getKey(), why[0]);
+            }
         }
         context.put("prefsMap", result);
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-commits-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-commits-help@portals.apache.org