You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by vo...@apache.org on 2022/10/17 19:53:21 UTC

[myfaces] branch main updated: MYFACES-4480: Fix NullPointerException in TagAttributeImpl#getBoolean

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

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


The following commit(s) were added to refs/heads/main by this push:
     new e91eb3c36 MYFACES-4480: Fix NullPointerException in TagAttributeImpl#getBoolean
     new 698517dd7 Merge pull request #345 from volosied/MYFACES-4480
e91eb3c36 is described below

commit e91eb3c36c89e7fa8de61b97aec6cb6343c15ae3
Author: Volodymyr Siedlecki <vo...@gmail.com>
AuthorDate: Fri Oct 14 09:35:01 2022 -0400

    MYFACES-4480: Fix NullPointerException in TagAttributeImpl#getBoolean
---
 .../org/apache/myfaces/view/facelets/tag/TagAttributeImpl.java     | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/TagAttributeImpl.java b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/TagAttributeImpl.java
index a9ff6d36f..60e1a9b19 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/TagAttributeImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/TagAttributeImpl.java
@@ -135,7 +135,12 @@ public final class TagAttributeImpl extends TagAttribute
         }
         else
         {
-            return ((Boolean) this.getObject(ctx, Boolean.class));
+            Boolean result = ((Boolean) this.getObject(ctx, Boolean.class));
+            if(result == null)
+            {
+                return false;
+            }
+            return result;
         }
     }