Paul Nicolucci created MYFACES-4504:
---------------------------------------
Summary: UnsupportedOperationException from
NavigationHandlerImpl.handleNavigation
Key: MYFACES-4504
URL: https://issues.apache.org/jira/browse/MYFACES-4504
Project: MyFaces Core
Issue Type: Bug
Components: General
Affects Versions: 4.0.0-RC2, 2.3-next-M7
Reporter: Paul Nicolucci
Assignee: Paul Nicolucci
Stack trace of the exception:
{noformat}
java.lang.UnsupportedOperationException
at java.base/java.util.AbstractMap.put(AbstractMap.java:209)
at
org.apache.myfaces.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:194)
at
org.apache.myfaces.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:115)
at
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:122)
at jakarta.faces.component.UICommand.broadcast(UICommand.java:65)
at jakarta.faces.component.UIViewRoot._broadcastAll(UIViewRoot.java:1233)
at jakarta.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:414)
at jakarta.faces.component.UIViewRoot._process(UIViewRoot.java:1705)
at
jakarta.faces.component.UIViewRoot.processApplication(UIViewRoot.java:915)
at
org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:43)
at
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:172)
at
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:125)
at
jakarta.faces.webapp.FacesServlet.service(FacesServlet.java:223){noformat}
This happens because there is an EmptyMap returned from:
{noformat}
Map<String, List<String>> navigationCaseParameters =
navigationCase.getParameters();{noformat}
and then a "put" operation is executed. However, the EmptyMap is coming from
the changes in this commit:
[https://github.com/apache/myfaces/commit/7262f0a3296bd2c31402dc571d65a1816a4e45a9#diff-5251ef056d9a5508580a730031342370484f088738963e6e676fc3c151006ca0R49]
The "Collections.emptyMap()" is immutable and therefore the
UnsupportedOperationException is thrown.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)