myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [myfaces-test] 05/24: when object is null return null
Date Thu, 03 May 2018 18:26:33 GMT
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 <lu4242@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.

Mime
View raw message