myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r1776580 - /myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java
Date Fri, 30 Dec 2016 14:51:25 GMT
Author: deki
Date: Fri Dec 30 14:51:25 2016
New Revision: 1776580

URL: http://svn.apache.org/viewvc?rev=1776580&view=rev
Log:
avoid NPE

Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java?rev=1776580&r1=1776579&r2=1776580&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java
Fri Dec 30 14:51:25 2016
@@ -259,12 +259,14 @@ public final class AttributeHandler exte
           if (action != null) {
             ((ActionSource) parent).addActionListener(new MethodExpressionActionListener(action));
           }
-        } else if (!parent.getAttributes().containsKey(nameValue.getName())) {
+        } else if (nameValue != null && !parent.getAttributes().containsKey(nameValue.getName()))
{
           if (value.isLiteral()) {
             parent.getAttributes().put(nameValue.getName(), value.getValue());
           } else {
             parent.setValueExpression(nameValue.getName(), value.getValueExpression(faceletContext,
Object.class));
           }
+        } else if (nameValue == null) {
+          LOG.warn("Null value for {}", name);
         }
       }
     }



Mime
View raw message