eclipse-ee4j / mojarra

Mojarra, a Jakarta Faces implementation
Other
159 stars 109 forks source link

ConcurrentModificationException in UIData#isNestedWithinIterator #5241

Closed tandraschko closed 1 year ago

tandraschko commented 1 year ago

I currently experiment a bit to clean out PrimeFaces UIData class but many times i get:

java.util.ConcurrentModificationException at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1135) at com.sun.faces.util.Util.isNestedInIterator(Util.java:1746) at javax.faces.component.UIData.isNestedWithinIterator(UIData.java:2291) at javax.faces.component.UIData.getClientId(UIData.java:859) at org.primefaces.component.datatable.DataTable.shouldEncodeFeature(DataTable.java:198) at org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:84) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:600) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1655) at javax.faces.render.Renderer.encodeChildren(Renderer.java:152) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:571) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1648) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1651) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1651) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:461) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:170)

it was probably introduced during https://github.com/eclipse-ee4j/mojarra/issues/495

Currently it can only be replicated while repclaing PFUIData with https://gist.github.com/tandraschko/19c9926d9f831f22dcf018cefa267351 and running mvn verify -Pintegration-tests,parallel-execution,mojarra-2.3 -Dit.test=DataTable

This is very important as we cant remove the code with such an exception

melloware commented 1 year ago

I think it was fixed in #5236

BalusC commented 1 year ago

Can you reconfirm, @tandraschko ?

tandraschko commented 1 year ago

Looks like the same, yup

BalusC commented 1 year ago

ok! :)