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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to