You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by de...@apache.org on 2018/05/03 18:26:33 UTC

[myfaces-test] 05/24: when object is null return null

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

deki pushed a commit to branch 1_0_0_beta_4
in repository https://gitbox.apache.org/repos/asf/myfaces-test.git

commit c75ed26941b292b7adb3f0c208904ad5e00bce58
Author: Leonardo Uribe <lu...@apache.org>
AuthorDate: Sat May 29 01:15:13 2010 +0000

    when object is null return null
---
 .../main/java/org/apache/myfaces/test/el/MockExpressionFactory.java   | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/test12/src/main/java/org/apache/myfaces/test/el/MockExpressionFactory.java b/test12/src/main/java/org/apache/myfaces/test/el/MockExpressionFactory.java
index a86d7b3..350848e 100644
--- a/test12/src/main/java/org/apache/myfaces/test/el/MockExpressionFactory.java
+++ b/test12/src/main/java/org/apache/myfaces/test/el/MockExpressionFactory.java
@@ -123,6 +123,10 @@ public class MockExpressionFactory extends ExpressionFactory {
         if ((object != null) && targetType.isAssignableFrom(object.getClass())) {
             return object;
         }
+        
+        // new to spec
+        if (object == null)
+            return null;
 
         // We do not know how to perform this conversion
         throw new IllegalArgumentException("Cannot convert " + object + " to " + targetType.getName());

-- 
To stop receiving notification emails like this one, please contact
deki@apache.org.