You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2020/07/09 07:22:34 UTC

[myfaces] branch master updated: MYFACES-4351

This is an automated email from the ASF dual-hosted git repository.

tandraschko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/master by this push:
     new ab8885a  MYFACES-4351
ab8885a is described below

commit ab8885abf65389cc4021f5df2c40329f949aa1df
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Thu Jul 9 09:22:29 2020 +0200

    MYFACES-4351
---
 .../org/apache/myfaces/el/resolver/LambdaBeanELResolver.java     | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/impl/src/main/java/org/apache/myfaces/el/resolver/LambdaBeanELResolver.java b/impl/src/main/java/org/apache/myfaces/el/resolver/LambdaBeanELResolver.java
index a1459d6..5ccfb9b 100644
--- a/impl/src/main/java/org/apache/myfaces/el/resolver/LambdaBeanELResolver.java
+++ b/impl/src/main/java/org/apache/myfaces/el/resolver/LambdaBeanELResolver.java
@@ -25,6 +25,7 @@ import java.util.concurrent.ConcurrentHashMap;
 import javax.el.BeanELResolver;
 import javax.el.ELContext;
 import javax.el.ELException;
+import javax.el.PropertyNotFoundException;
 import javax.el.PropertyNotWritableException;
 import javax.faces.context.FacesContext;
 import org.apache.myfaces.core.api.shared.lang.LambdaPropertyDescriptor;
@@ -154,6 +155,12 @@ public class LambdaBeanELResolver extends BeanELResolver
             cache.put(base.getClass().getName(), beanCache);
         }
 
-        return beanCache.get((String) property);
+        PropertyDescriptorWrapper pd = beanCache.get((String) property);
+        if (property == null)
+        {
+            throw new PropertyNotFoundException("Property [" + property
+                    + "] not found on type [" + base.getClass().getName() + "]");
+        }
+        return pd;
     }
 }