You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2024/01/04 09:33:03 UTC
(myfaces) branch main updated: MYFACES-4645
This is an automated email from the ASF dual-hosted git repository.
tandraschko 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 477b5871c MYFACES-4645
477b5871c is described below
commit 477b5871cb25621dbbc6abd75c4e6695ae482958
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Thu Jan 4 10:32:54 2024 +0100
MYFACES-4645
---
.../java/org/apache/myfaces/core/api/shared/SelectItemsUtil.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/api/src/main/java/org/apache/myfaces/core/api/shared/SelectItemsUtil.java b/api/src/main/java/org/apache/myfaces/core/api/shared/SelectItemsUtil.java
index ca8c0694a..669ddbbf8 100644
--- a/api/src/main/java/org/apache/myfaces/core/api/shared/SelectItemsUtil.java
+++ b/api/src/main/java/org/apache/myfaces/core/api/shared/SelectItemsUtil.java
@@ -285,7 +285,12 @@ public class SelectItemsUtil
UIComponent uiComponent, Object value, SelectItem selectItem, Converter converter)
{
Object itemValue = selectItem.getValue();
- if (converter != null && itemValue instanceof String string)
+ if (itemValue == null && value == null)
+ {
+ return null;
+ }
+
+ if (converter != null && !(value instanceof String) && itemValue instanceof String string)
{
itemValue = converter.getAsObject(facesContext, uiComponent, string);
}