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:06 UTC

[myfaces] branch 2.3.x updated: MYFACES-4480: Fix NPE TagAttributeImpl#getBoolean

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

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


The following commit(s) were added to refs/heads/2.3.x by this push:
     new 959a20d64 MYFACES-4480: Fix NPE TagAttributeImpl#getBoolean
     new cbd218ee2 Merge pull request #351 from volosied/MYFACES-4480-2.3.x
959a20d64 is described below

commit 959a20d645ff5e8818598c3c21a156eeda2a054e
Author: Volodymyr Siedlecki <vo...@gmail.com>
AuthorDate: Mon Oct 17 14:06:03 2022 -0400

    MYFACES-4480: Fix NPE 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 fe08e14de..b18ce3682 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
@@ -136,7 +136,12 @@ public final class TagAttributeImpl extends TagAttribute
         }
         else
         {
-            return ((Boolean) this.getObject(ctx, Boolean.class)).booleanValue();
+            Boolean result = ((Boolean) this.getObject(ctx, Boolean.class)).booleanValue();
+            if(result == null)
+            {
+                return false;
+            }
+            return result;
         }
     }