[
https://jira.codehaus.org/browse/DISPL-491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=288169#comment-288169
]
Oleksandr Maksymchuk commented on DISPL-491:
--------------------------------------------
I've also hit the same issue in this code:
{code}
Iterator paramsIterator =
baseHref.getParameterMap().keySet().iterator();
while (paramsIterator.hasNext())
{
String key = (String) paramsIterator.next(); // EXCEPTION
HERE
// don't remove parameters added by the table tag
if (!this.paramEncoder.isParameterEncoded(key))
{
baseHref.removeParameter(key);
}
}
{code}
Caused by: java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$KeyIterator.next(HashMap.java:828)
at org.displaytag.tags.TableTag.initHref(TableTag.java:1172)
Can it be resolved by just using remove method of iterator instead of using
removeParameter?
> Display tag errors with ConcurrentModificationException in portlets with more
> than one parameter inside portlet
> ---------------------------------------------------------------------------------------------------------------
>
> Key: DISPL-491
> URL: https://jira.codehaus.org/browse/DISPL-491
> Project: DisplayTag
> Issue Type: Bug
> Components: Paging/Sorting
> Affects Versions: 1.1.1
> Reporter: Pat Leamon
> Fix For: TBD
>
> Attachments: PortletHref.java
>
>
> I'm using display tag with custom paging and running inside a portlet. My
> paging requires a searchId to be set as well as the page id, and this works
> fine when using it outside the portlet.
> When using it inside the portlet, the initial display is fine. After
> selecting a page however, display tag dies with a concurrent modification
> exception. I tracked this down to the section in TableTag.initHref(..) where
> it's removing the un-encoded parameters - I have exclude set to *.
> Attached is an updated PortletHref which follows the same procedure as
> DefaultHref and only pass back copies of the parameter map. This resolves
> the issue for me - paging now works.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
displaytag-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel