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:52:38 UTC

[myfaces] branch 2.2.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.2.x
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/2.2.x by this push:
     new 16f8cdacb MYFACES-4480: Fix NPE TagAttributeImpl#getBoolean
     new db904928e Merge pull request #353 from volosied/MYFACES-4480-2.2.x
16f8cdacb is described below

commit 16f8cdacb1e1b288d8e7e69dd7fe2a70629e9087
Author: Volodymyr Siedlecki <vo...@gmail.com>
AuthorDate: Mon Oct 17 14:04:36 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 c47092e18..c44f46c0c 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
@@ -141,7 +141,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;
         }
     }