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/22 12:49:15 UTC

[myfaces] branch 2.3-next updated: MYFACES-4504: check isEmpty() to avoid UnsupportedOperationException (#388)

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

melloware pushed a commit to branch 2.3-next
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/2.3-next by this push:
     new c5c680387 MYFACES-4504: check isEmpty() to avoid UnsupportedOperationException (#388)
c5c680387 is described below

commit c5c680387eb18e244beb745fdacf4691d9e9ee9f
Author: Paul A. Nicolucci <pn...@gmail.com>
AuthorDate: Tue Nov 22 07:49:10 2022 -0500

    MYFACES-4504: check isEmpty() to avoid UnsupportedOperationException (#388)
---
 .../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 f98e83944..48ca1514c 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);
                         }