You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by me...@apache.org on 2022/11/21 18:54:37 UTC

[myfaces] branch main updated: MYFACES-4504: check isEmpty() to avoid UnsupportedOperationException (#387)

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

melloware 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 8956fd167 MYFACES-4504: check isEmpty() to avoid UnsupportedOperationException (#387)
8956fd167 is described below

commit 8956fd167f797a4e32511e268a6520715cb132a5
Author: Paul A. Nicolucci <pn...@gmail.com>
AuthorDate: Mon Nov 21 13:54:31 2022 -0500

    MYFACES-4504: check isEmpty() to avoid UnsupportedOperationException (#387)
---
 .../java/org/apache/myfaces/application/NavigationHandlerImpl.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java b/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
index 1971cef12..5e3fe5d17 100755
--- a/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
@@ -181,7 +181,8 @@ public class NavigationHandlerImpl extends ConfigurableNavigationHandler
                     if ((currentFlow != null && !currentFlow.equals(targetFlow)) ||
                                     (targetFlow != null && !targetFlow.equals(currentFlow)))
                     {
-                        if (navigationCaseParameters == null)
+                        // MYFACES-4504: check isEmpty()
+                        if (navigationCaseParameters == null || navigationCaseParameters.isEmpty())
                         {
                             navigationCaseParameters = new HashMap<>(5, 1f);
                         }